I have a simple login form ..

if i type my password and CLICK submit it will work

if i type my password and press the enter key it goes back to the script URL .. no invalid password, nothing .. i have errors setup for this.

I dont understand how if i click the submit button it works, but if i press enter on the keyboard it doesnt ..

Any help?

    You need another field, even just a dummy hidden field.

      Well, i already had a hidden field, but just to be on the safe side i added another.

      The problem still continues ..

        I think you have the first check for the submit button. Dont use it. Use something like:
        if (!empty($_POST['password'])) {
        ...

        Its a browser issue. Some browsers send the submit button with enter while others dont.

          Write a Reply...