mirror of
https://github.com/c0de-archive/GAMA-Site.git
synced 2024-12-22 09:42:39 +00:00
Updated to mysqli
This commit is contained in:
parent
55f51ac6e8
commit
dd5f2427fb
@ -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');
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
|
Loading…
Reference in New Issue
Block a user