Created
September 21, 2011 15:17
-
-
Save benrasmusen/1232333 to your computer and use it in GitHub Desktop.
POST search to GET params CakePHP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (!empty($this->data)) { | |
$redirect = array( | |
'controller' => '{controller}', | |
'action' => '{action}' | |
); | |
foreach ($this->data as $key => $value) { | |
$redirect[$key] = $value; | |
} | |
$this->redirect($redirect); | |
} | |
$search_key = $this->params['named']['{search_key}']; // Look for this when searching |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment