Updated to mysqli

This commit is contained in:
alopexc0de 2013-02-15 15:54:16 -05:00
parent 55f51ac6e8
commit dd5f2427fb

View File

@ -7,6 +7,9 @@ $db_name=""; // Database name
$tbl_name=""; // Table name $tbl_name=""; // Table name
// Connect to server and select database. // Connect to server and select database.
mysql_connect("$host", "$username", "$password")or die("Unable to connect to database server - check dbsettings.php"); $db = new mysqli($host, $username, $password, $db_name);
mysql_select_db("$db_name")or die("Unable to connect to database - check dbsettings.php");
if($db->connect_errno > 0){
die('Unable to connect to database [' . $db->connect_error . '] - Check dbsettings.php');
}
?> ?>