DayZ-Stat-Server/consql.php

29 lines
665 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 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:14:31 +01:00
2021-02-02 23:34:59 +01:00
$servdb = "localhost";
$userdb = "user";
$pdb = "pass";
$dbname = "database";
2021-02-04 21:05:13 +01:00
$table = "StatServer_1";
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
?>