How can I access a GET request in CAKEPHP ?
If I am passing a variable in the url
http://samplesite.com/page?key1=value1&key2=value2
Should I use $_GET or $this->params to get the values in controller?
What is the standard in CAKEPHP ?
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.
The standard way to do this in Cake is to use
$this->params.According to the CakePHP book, “the most common use of $this->params is to access information that has been handed to the controller via GET or POST operations.”
See here.