2021-01-31 13:16:02 +01:00
|
|
|
<?php
|
2021-02-02 17:05:03 +01:00
|
|
|
|
2021-02-04 20:56:10 +01:00
|
|
|
//# Change with your credential here.
|
|
|
|
// Create Database first ;)
|
2021-02-04 18:00:02 +01:00
|
|
|
|
2021-02-04 22:48:43 +01:00
|
|
|
|
2021-02-05 22:26:36 +01:00
|
|
|
$servdb = "localhost";
|
|
|
|
$userdb = "dayz";
|
|
|
|
$pdb = "dayz32";
|
|
|
|
$dbname = "dayzstat";
|
|
|
|
$table = "StatServer_5";
|
|
|
|
|
|
|
|
/*
|
2021-02-02 23:34:59 +01:00
|
|
|
$servdb = "localhost";
|
|
|
|
$userdb = "user";
|
|
|
|
$pdb = "pass";
|
|
|
|
$dbname = "database";
|
2021-02-05 22:26:36 +01:00
|
|
|
$table = "StatServer_1";
|
|
|
|
*/
|
2021-02-05 13:16:04 +01:00
|
|
|
|
2021-02-04 18:00:02 +01:00
|
|
|
$StatServer = $table;
|
|
|
|
$con = new mysqli($servdb, $userdb, $pdb, $dbname);
|
2021-01-31 18:12:00 +01:00
|
|
|
|
2021-02-05 00:18:56 +01:00
|
|
|
if ($con->connect_error) {
|
2021-02-02 23:34:59 +01:00
|
|
|
// Display the alert box
|
2021-02-04 18:00:02 +01:00
|
|
|
// echo '<script>alert("...Connection failed with MYSQL")</script>';
|
2021-02-02 23:34:59 +01:00
|
|
|
echo "<center><font color=red> ...Connection failed with MYSQL </font></center>";
|
|
|
|
// die("Connection failed: " . $con->connect_error);
|
2021-02-05 00:18:56 +01:00
|
|
|
} else {
|
2021-02-02 23:34:59 +01:00
|
|
|
// echo "Connect Successfully";
|
2021-01-31 13:16:02 +01:00
|
|
|
}
|
2021-01-31 18:12:00 +01:00
|
|
|
|
2021-01-31 13:16:02 +01:00
|
|
|
|
|
|
|
?>
|