1

I've got a URL parameter I need to get to pass to a PHP MySQL Variable. Lets say for instance my URL is:

www.facebook.com/?ref=logo 

Normally it'd $_GET to get the value of ref. How would I go about doing this in a CodeIgniter model? From what I understand, $_GET doesn't work with CI?

2 Answers 2

4

Its in the input class.

 $ref = $this->input->get('ref');

Source : http://ellislab.com/codeigniter/user_guide/libraries/input.html

Sign up to request clarification or add additional context in comments.

Comments

2

Get works just fine in CodeIgniter. You would access it in a similar way to POST values:

$ref = $this->input->get('ref', true);

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.