DayZ-Stat-Server/consql.php

27 lines
618 B
PHP
Raw Normal View History

2021-01-31 13:16:02 +01:00
<?php
2021-02-02 17:05:03 +01:00
2021-02-04 18:00:02 +01:00
# Change to our need
2021-02-02 23:34:59 +01:00
$servdb = "localhost";
$userdb = "user";
$pdb = "pass";
$dbname = "database";
2021-02-04 18:00:02 +01:00
$table = "StatServer_5";
2021-01-31 21:28: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-01-31 13:16:02 +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-01-31 13:16:02 +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
?>