Hello, on 10/02/2009 05:23 AM kranthi said the following: >>> That only works if the user clicks on that submit button. If the user >>> hits the enter key in a text input, the form is submitted but the submit >>> input variable is not set. That is why an hidden input is a safer solution. > > i doubt that, because i use the above mentioned method in nearly all > of my projects, and all of them are working fine. > > P.S: i prefer keyboard to mouse as a input device Sorry, what I meant is that if you have multiple submit buttons in your form, say "Preview", "Save" and "Cancel", if you hit enter in a text input it will not set the variables for all buttons. At most only one button variable is set, which usually is the first button in the HTML, but you have no way to change which will be set. If you use an hidden field is easier to determine whether the form was submitted or not, as you do not have to check variables for all buttons. -- Regards, Manuel Lemos Find and post PHP jobs http://www.phpclasses.org/jobs/ PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php