Jump to content

Submit button & get


dig412

Recommended Posts

I'm submitting a form using GET, but for some reason, when i submit, the value of the submit button is added on as well. i've never noticed this before, any ideas?

[code]
<form action="index.php" method="GET">
<input type="hidden" name="mode" value="img" />
<input type="text" name="usertxt" /><br>
Shouting: <input type="radio" name="image" value="shout" checked="checked"/><br>
Newsreader: <input type="radio" name="image" value="news" /><br>
<input type="submit" value="Say It!" />
</form>
[/code]

produces:
index.php?mode=img&usertxt=[whatever]&image=news&Submit=Say+It!
Link to post
Share on other sites
The submit button is part of the form and gets sent just like any other field.

You really should use the POST method, since it is a little more secure (it's harder for the casual user to see what's being passed) and more data can be passed from the form.

Ken
Link to post
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.