Possible Duplicate:
Can JavaScript connect with MySQL?
I have a database with names and emails. When the user fills a email input field with a email. JS checks it with the database and writes out persons name after he completed the email in the field.
joe@exampl.com Welcome John Doe!
Is it Possible to retrieve MySQL Database data using JavaScript?
Any help would be appreciated.
Assuming a typical browser environment (since you specify client side code), no, and it would be insane to expose the database in a way that would grant a browser such permissions if it were possible.
Write a web service that the browser can interact with by using Forms or Ajax to make HTTP requests instead.
(Aside: If you hadn’t specified client side, then node js can do it).