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 comment
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 comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.