How to do MVC form url formatting?

Posted by dqhendricks on Stack Overflow See other posts from Stack Overflow or by dqhendricks
Published on 2011-01-07T16:37:58Z Indexed on 2011/01/07 16:54 UTC
Read the original article Hit count: 219

Filed under:
|
|
|
|

I am using PHP. I want to create an MVC setup from scratch to learn more about how MVC works. I want to use clean urls with slashes as delimiters for the arguments. How do people do this when it comes to GET method forms? Or do people avoid GET method forms all together?

As of right now the ways I can imagine are:

  1. Don't use GET method forms (although this makes it harder to let users bookmark/link in some cases).
  2. Use AJAX instead of form submission (although what do you do for SEO and JS disablers?).
  3. Have page submit to itself with post method, then reform the post vars into an url, then rerout to that url using headers (seems like wasted resources).

Any suggestions or suggested reading welcome.

© Stack Overflow or respective owner

Related posts about php

Related posts about mvc