Jump to content

Back To Html From Php


mvsveena
 Share

Recommended Posts

Hi all,Appreciate your help on below question. Thanks in advance.I have created a Login form in html and onSubmit event (method POST) - it access to php file which connects with the mySql db. In the php file I have used select query to retrieve user name and pwd. Everything is working fine, am getting the query results properly. Once all these things are done, I have to show a message in the same html form in the following cases:1. Login successful2. user id and pwd not match (I have to throw the same login form html page)I struck in how to throw the same html page with the messages like 'user id and pwd not match' or 'userid does not exist' back from the php file.Kindly help on this.-Veen

Link to comment
Share on other sites

You can either use sessions to store the error message and then redirect (using header(), for example), or just have the PHP code on the same page as the form.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...