Connect a html document to databse

Closed
rajesh - Sep 7, 2010 at 04:27 AM
 samrm111 - Nov 6, 2011 at 01:26 AM
Hello, this is raja valeti i want connect a html document to databse.
i don't know how to connect it could u plz tell me how to connect html document to database and plz send a simple example for this


1 reply

<?php

$connect = mysql_connect ("location","admin name","password");

if (!$connect){
die("Failed to connect:" . mysql_error());
}
if (!mysql_selct_db("database_name")) {
die("Failed to selct DataBase" . mysql_error());
}

?>
0