Page 1 of 1

login

Posted: Mon Apr 11, 2011 10:56 am
by Anant
Hi.

I am implementing modal pop up login system.

Modal pop up is working absolutely fine. I have got a modal pop up with a form and within that form there is option for user to enter
username,
password
and then button sign in.

When user clicks sign in(submit button) - the page goes to xyd.php and perform set of funtion to see if the user entered correct username or password.

Now my problem is - if the username or password is incorrect - i want the error message to be displayed on the modal popup and not on the xyz.php page. What would be best way to achieve this ??

Thanks

Re: login

Posted: Mon Apr 11, 2011 11:02 am
by greyhoundcode
Perhaps submit the login credentials by ajax to a script that returns true/false according to whether the credentials are good.

If true is returned you could redirect to xyz.php, but if false is returned you could display the appropriate message.

Re: login

Posted: Mon Apr 11, 2011 11:19 am
by Anant
Thanks for your reply.

This sounds like a solution to me. But not too sure how to implement it at the moment. If you come across any example then please send my way.