PHP - FORM submit - ENTER vs. MOUSECLICK
Posted: Thu Apr 17, 2003 5:34 am
hi there!
i have a strange problem and maybe somebody can help me :
let's say I've a form ( with inputs, selects, submitbutton etc. ) which submits the data to the same physical file ( e.g. index.php ). when the user enters some data and submits the form, I check the $_REQUEST["submit"] variable for its value and if set, I work with the data. ( if ($_REQUEST["submit"]) { ... } ). And now the bug : when the user clicks ( with the mouse ) on the submitbutton everything works fine, but when the user just presses the enter ( or return) key, the form submits but the $_REQUEST["submit"] (submitbutton) variable is not set ( theres no javascript or anythign else - just a normal form ) ! does anybody have the same problem or - better - a solution ? Thanks in advance !
HoBro
i have a strange problem and maybe somebody can help me :
let's say I've a form ( with inputs, selects, submitbutton etc. ) which submits the data to the same physical file ( e.g. index.php ). when the user enters some data and submits the form, I check the $_REQUEST["submit"] variable for its value and if set, I work with the data. ( if ($_REQUEST["submit"]) { ... } ). And now the bug : when the user clicks ( with the mouse ) on the submitbutton everything works fine, but when the user just presses the enter ( or return) key, the form submits but the $_REQUEST["submit"] (submitbutton) variable is not set ( theres no javascript or anythign else - just a normal form ) ! does anybody have the same problem or - better - a solution ? Thanks in advance !
HoBro