Hello,
I am designing a web page and i need to write a function for the 'onchange' event of textfield. And I need to connect to database for the purpose.How can I insert the php code for db connection inside javascript??
Thank you
Printable View
Hello,
I am designing a web page and i need to write a function for the 'onchange' event of textfield. And I need to connect to database for the purpose.How can I insert the php code for db connection inside javascript??
Thank you
Write a PHP file to handle the specific inputs and outputs you need from your database (assuming it works like, or is an SQL database), and let it manage the security behind it. Then connect to that PHP page using AJAX with JavaScript to communicate with the page to send/recieve information to/from the database.