Click here to Skip to main content
15,867,686 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hi i am newbie in coding.
Please help me.
I want to validate the HTML login page(email and password) with java script code .
And I want to connect that HTML login page to MySQL workbench server.
do i need to use php code for connectivity? please provide code.

when i enter wrong credentials it should redirect in same page and show error message beside email or password like invalid wrong email or password you typed.

What I have tried:

I have tried it but i am getting error message in pop up.I dont need pop up.
I have connected root localhost for MySQL workbech serverbut not fetching the credentials.
Posted
Updated 9-Nov-16 2:26am

You probably want to connect the MySQL database and not the Workbench (which is a software providing UI to your server)...
In nay case you can not connect your database from the client (where the HTML page is) using JavaScript... You need some server side code (PHP is good, but can be any other too), that JavaScript can talk to and will provide data services...

This may be a good starting point: PHP AJAX and MySQL[^]
 
Share this answer
 
Comments
Venkatesh K H 9-Nov-16 4:55am    
ya that's fine. what is the code for show error message when credentials doesn't matches while login. thank you
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900