Skip to content

Instantly share code, notes, and snippets.

@benrasmusen
Created September 21, 2011 15:17
Show Gist options
  • Save benrasmusen/1232333 to your computer and use it in GitHub Desktop.
Save benrasmusen/1232333 to your computer and use it in GitHub Desktop.
POST search to GET params CakePHP
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