trante
trante

Reputation: 33996

Passing form values to controller action params in CakePHP

In my HTML form I need the URL output like this: "example.com/mycontroller/action/mike/apple"

Upvotes: 1

Views: 1729

Answers (1)

dr Hannibal Lecter
dr Hannibal Lecter

Reputation: 6721

If you make a POST form, it doesn't really matter where does it post to, what matters is where does it redirect. Many site searches redirect you to www.domain.com/search/search_terms so if this is a search form, there is nothing wrong with redirecting to ../action/mike/apple.

Additionally, if it is a POST form, it will not be filled in by the search crawlers (or at least not to my knowledge), so again it shouldn't matter where does the form post to, what matters is the return value and where does it redirect.

It all really depends on what are you trying to accomplish.

Upvotes: 1

Related Questions