Login Validation
Posted: Mon Apr 14, 2008 12:12 am
Hi,
I have a login section in my home page.
When I try to login using valid credentials and click on "Submit" button, it opens a new page with user information.
Now I would like to validate whether user is valid or not.
So What I would like to do is, when somebody tries to login using invalid credentials then my homepage should not be redirected to any other page, instead, there should be a message in the login section (next to user name and Password textboxes) of the home page that "Invalid Username/Password".
Another question is:
Let's say there is a login section in my home page.
Now if user log in using valid credentials then he should be redirected to Page1.php.
Else if the login credentials are invalid then he should be redirected to Page2.php.
(I would like to use a separate php file to access database)
How do I accomplish these?
Thanks.
I have a login section in my home page.
When I try to login using valid credentials and click on "Submit" button, it opens a new page with user information.
Now I would like to validate whether user is valid or not.
So What I would like to do is, when somebody tries to login using invalid credentials then my homepage should not be redirected to any other page, instead, there should be a message in the login section (next to user name and Password textboxes) of the home page that "Invalid Username/Password".
Another question is:
Let's say there is a login section in my home page.
Now if user log in using valid credentials then he should be redirected to Page1.php.
Else if the login credentials are invalid then he should be redirected to Page2.php.
(I would like to use a separate php file to access database)
How do I accomplish these?
Thanks.