login

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Anant
Forum Commoner
Posts: 66
Joined: Wed Jul 14, 2010 11:46 am

login

Post 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
User avatar
greyhoundcode
Forum Regular
Posts: 613
Joined: Mon Feb 11, 2008 4:22 am

Re: login

Post 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.
Anant
Forum Commoner
Posts: 66
Joined: Wed Jul 14, 2010 11:46 am

Re: login

Post 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.
Post Reply