php - CakePHP session ID path or other method to share the results of a url - recommendations welcome -


i looking suggestions on sensible cake approach creating session id based url can share others see same search results seeing on end.

i know in standard php, session id , pass url. guess cake has method or approach exact thing (my guess). have not been able locate specific yet.

any ideas best approach cake methods? or need re-invent wheel on this?

are asking because using post , consequentially url not include search parameters, through get?

i use following design paradigm search on apps build.

  1. search form submits post.
  2. in controller action, if form submitted post, extract search parameters, , redirect url includes (named*) parameters.

so action code might this:

function search() {     if($this->requesthandler->ispost()) {         // let's extract parameters called $a , $b here         $this->redirect(array(             'action' => 'search',             'a' => $a,             'b' => $b         )         exit();     )     // perform normal search operation     // 'a' , 'b' parameters can accessed in $this->params['named']     // array, automatically extracted cakephp router using configuration below. } 

with regard named parameters, have set in routes.php:

router::connectnamed(array('a', 'b')); 

this results in redirect above creating nice, clean-looking url like:

http://example.com/controller/search/a:foo/b:bar 

Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -