Jump to content

Archived

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

dig412

Submit button & get

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!

Share this post


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

Share this post


Link to post
Share on other sites
I originaly used post, but it causes problems when saving the image in firefox. the form doesn't need to be secure, as it just passes information to a gd script.

Share this post


Link to post
Share on other sites

×

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.