MySQL - Database Connection with html

Asked By Rajan Shedbalkar on 28-Jan-10 02:03 AM

I have a track page in html. & I also created a database using mySQL. Is it possible to connect my htnl page to MYSql database.

Pls help me to any other solution.

connecting to MySQL

mv ark replied to Rajan Shedbalkar on 28-Jan-10 04:00 AM
Although you cannot directly fetch data from a MySQL database into a HTML page, you can make use of an intermediary script that is written in a server-side programming language like PHP or ASP.NET/C# to connect to MySQL db & then refer to this in you HTML page using AJAX

This code sample shows how you can achieve this - http://www.webpasties.com/xmlHttpRequest/xmlHttpRequest_tutorial_1.html

You can alternatively use the jQuery AJAX methods to call a server-side script in a HTML page - http://docs.jquery.com/Ajax
Ryan C. replied to Rajan Shedbalkar on 06-Feb-10 02:29 PM

a page with an .html extention is what we call a static page. Now the connectivity between html pages and a daataabase (mySQL) needs to be dynamic. Thus instead of saving our pages with a .html extension, we use .php, .asp ....etc

They will still contain html coding, however you be able to create a connection script to the database and be easily to manipulate data from your page.

Are you familiar with any other coding languages?