Re: problem with submit button
| From: | Ingus | Date: | Fri, 16 May 2003 14:26:43 +0000 |
| Subject: | Re: problem with submit button | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-147896@lists.php.net to get a copy of this message | ||
Riza Fahmi wrote:
Hi all,
I have a little problem here. Let say i have 1 page for login (have
2 textbox, name and password, and submit button). And if user click
submit button, then go to 2nd page. In the 2nd page:
<?
if(isset($_POST['submit'])
{
print "Submit Button click";
}
else
{
print "Submit Button not click";
}
?>
the problem are, after user filled two textbox on login form, and
then user push ENTER on his/her keyboard, in 2nd page appear "Submit
Button not click". I want if they push ENTER, still appear "Submit
Button click". Can anyone help me for this problems? By the way,
thanks for the attention.
That's a HTML trick - if you press ENTER the value of submit button is not set, if you click it - it is set.
You can fix this by using a hidden field and checking whether it's set or by checking whether any of the text fields have been set.
--
Ingus