I know it’s been asked before, but I need it for affiliate tracking…
http://www.mysite.com/controller/method/params?affiliate=123&sub_id=456
How can I get the params AND the $_GET parameters outlined in that URL?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
And yet, sometimes you need access to GET variables in CodeIgniter.
One glaring example is when you use an API that sends a post-back to your site (Paypal, etc.)
The easiest way, in my opinion, is to parse a server variable with the GET data you need since $_GET has been wiped (in my example, REQUEST_URI has my GET data.):
This allows the functionality exactly where you need it without requiring a global change to framework settings.
Here is a usage example.