studio1p
New Member
- Messages
- 1
- Reaction score
- 0
- Points
- 1
<?php
$mysql_hostname = "198.91.81.7";
$mysql_user = "";
$mysql_password = "";
$mysql_database = "shoopingcart";
$prefix = "";
$bd = ($GLOBALS["___mysqli_ston"] = mysqli_connect($mysql_hostname, $mysql_user, $mysql_password)) or die("Could not connect database");
((bool)mysqli_query( $bd, "USE " . $mysql_database)) or die("Could not select database");
?>
<?php
//database connection
try {
$dbc = new PDO('mysql:host=198.91.81.7; dbname=shoopingcart', '', '');
$dbc->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );
} catch(PDOException $e) {
echo "Error: " . $e->getMessage();
}
?>
What's wrong with my codes?
$mysql_hostname = "198.91.81.7";
$mysql_user = "";
$mysql_password = "";
$mysql_database = "shoopingcart";
$prefix = "";
$bd = ($GLOBALS["___mysqli_ston"] = mysqli_connect($mysql_hostname, $mysql_user, $mysql_password)) or die("Could not connect database");
((bool)mysqli_query( $bd, "USE " . $mysql_database)) or die("Could not select database");
?>
<?php
//database connection
try {
$dbc = new PDO('mysql:host=198.91.81.7; dbname=shoopingcart', '', '');
$dbc->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );
} catch(PDOException $e) {
echo "Error: " . $e->getMessage();
}
?>
What's wrong with my codes?