A URL variable gets passed via the URL string. Like:
www.mysite.com?name=bob&type=male&day=friday
A Form variable gets passed in the form. Like:
Passing vars from FORM are better then URL. More secure. But in many cases passing vars in URL is easier.
2007-03-16 07:36:58
·
answer #1
·
answered by The First 3
·
1⤊
0⤋
If you are using the GET method to submit your form, their is essentially no difference between the two. If you have using the POST method however there is a difference.
In the post method, the URL is provided as part of the initial request to the website and the parameters are usually received an any number of subsequence packets received after the initial request. This gives the illusion of being safer, but it provides very little additional security. It is just not visible to the user of the website.
If you would like people to be able to use the parameters later to get directly to a resource (like google), then use the parameters in the URL (or use a form using GET). If you want people to have to go through your user interface (like an e-commerce site), then use form variable with POST.
2007-03-16 15:15:07
·
answer #2
·
answered by Math Guy 4
·
0⤊
0⤋
The uri one is some times called "Query string", that is adding to the uri such as www.microsoft.com a question mark followed by keys, followed by equal sign and followed by values and so on connected with & for more key and values as:
www.microsoft.com?id=12345&name=sql
The part "?id=12345&name=sql" is called "Query String". It's also some times encrypted so you would see a similar Query String such as: www.microsoft.com?HFIhseih85wy984y634hnjtghherhjuhrtDSfdg356FSDJffgd
The second kind, the FORM one, has either an action of POST or GET:
Inside the form you'd have some html controls such as a textbox, checkbox, radio buttons ...etc.
The user fills them, clicks a button to submit the form as it's common in login and registration forms and the server will get the data sent without you seeing this data appearing in the uri address bar.
2007-03-16 15:23:02
·
answer #3
·
answered by Coosa 2
·
1⤊
0⤋