The contents of the $_GET array is accessible through the $this- >params['url'] array. With the added bonus that if you have magic_quotes_gpc on, then they will be stripslashed.
For example, consider the following cake url : /products/search/ foo:bar?ham=eggs You then have $this->params['named']['foo'] ---> 'bar' and $this->params['url']['ham'] ---> 'eggs' On Jan 23, 11:52 am, Peter <[EMAIL PROTECTED]> wrote: > I'm looking to implement a search on my CakePHP App. I'd like to > implement the search using GET, so users can link to search results. > It also makes it a little easier to handle pagination. I wanted the > URL to be clean so I have the form set up without using the Cake > FormHelper: > > <form method="get"> > <p><label for="q">Search Query:</label> <input type="text" name="q" > id="q" value="<?php echo $keywords; ?>" /></p> > <p><?php echo $form->submit('Search Site'); ?></p> > </form> > > Then, when a user performs a search, the URL changes to /search/? > q=keywords. Is using the $_GET array the wrong way to go about getting > the search keywords? I looked at the Bakery and I see that they > implement the search using POST. I was also thinking along the lines > of getting the search to look like: /search/keywords+go+here/ which is > obviously easy to handle within cake, but that will take a little bit > of processing after each search which again seems like I would be > doing the wrong thing. > > I'd appreciate any opinions on the best way to implement this! Thanks > for reading! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---