HTML Form Action Attribute: Difference Between Values -


i learning html forms , in particular action attribute has me bit confused. difference between following values , when best use each case?

action="" action="?" action="?page" action="?page=main" action="." action="../" action="/" action="#" 

from w3 form documentation:

this [action] attribute specifies form processing agent

that is, form, when submitted, sends values wherever action set to. part noted actions submit form same page form displayed on. leave action out together or use <?php echo $_server['php_self']; ?> (if you're on php page) obtain same effect.

now, "?page=main" technically go same page well, page value set "main" (might used processing output somehow example). use if need page value, otherwise 1 of blank ones.


Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

javascript - Using Windows Media Player as video fallback for video tag -

c# - Unity IoC Lifetime per HttpRequest for UserStore -