Posted by Paul Furman on 03/15/07 22:26
Iván Sánchez Ortega wrote:
> Paul Furman wrote:
>
>
>>I'm getting incorrect response when hitting the enter key instead of
>>actually clicking the button on a form. It activates but the post data
>>[value='Update'] isn't being sent I think. The php generated page
>>flickers & reloads but doesn't perform the update.
>
>
> That's the way it works - The name/value pair of a submit button only gets
> submitted if the button is actualy pressed.
>
> If you want to have some data every time a form is submitted, rely on <input
> type='hidden'/> fields.
>
> (Check the W3.org HTML reference for more details).
I'm not sure why it worked before in the one case but THANKS!
I added:
<input type='hidden' name='buy' value='Update'>
on top of the old:
<input type='submit' name='buy' value='whatever'>
and it works!
The test is simply:
if (isset($_REQUEST["buy"])) {
Navigation:
[Reply to this message]
|