Hi,
I came across a problem when submitting a form which i managed to correct, but still i have no idea why it happened. I think it is a HTML issue.
Form is in a HTML file which contains a text box and a submit button, on submit (form's action calls it) it redirects to another form which is php. In the 2nd form, i check if the submit is valid as below:
if ( isset( $_POST['submit'] ) )
{
......
......
}
Well, the issue is, if the user presses the enter key to submit the form after entering a value for the text box, the above condition doesn't satisfy, so it doesn't work, but it works on mouse click. So, what i did to overcome the problem was to check if the text box contains a value or not,now it works.
$search_key = $_POST['serach_key'];
if ( isset( $_POST['submit'] ) || $search_key !="")
{
......
......
}
Why I'm confused is, some other form with exact phrase works when its called from an HTML page through form submit.
However, this problem occured in IE 6 & 7, not in Firefox.
Please let me know what the cause of this problem was.
Thanks a lot.
Have a nice day!