There's nothing wrong with that code snippet, I just tested it in Opera and it works fine. value="Submit" or value="Reply" makes no difference.|
Using an input type of image instead of submit changes the variables that get posted to PHP when the button is clicked. For a normal input type with name="DoSomething" and value="Go", you'd get $DoSomething in PHP with a value of "Go" (or just $_POST['DoSomething'] if register_globals is turned off). An image submit of the same type gives you $DoSomething_x and $DoSomething_y in PHP, with the x and y coordinates of where on the image was clicked. If your button does not have name attribute, as above, then you'll just get $x and $y. If you're checking for a certain value after the button is clicked, make sure you take that into account.
#6298623, By BCrowe PHP anomaly
BCrowe 524 posts
Seen 6 days ago
Registered 8 years ago