<?php/** * Created by runner.han * There is nothing new under the sun */header('Content-type:text/html;charset=utf-8'); include_once 'header.php';include_once 'inc/config.inc.php ';$dbhost=DBHOST;$dbuser=DBUSER;$dbpw=DBPW;$dbname=DBNAME;$dbport=DBPORT;$mes_connect='';$mes_create='';$mes_data='';$mes_ok='' ;if(isset($_POST['submit'])){ $link = mysqli_connect($dbhost, $dbuser, $dbpw,$dbport); //Judge the database connection //if(!@mysqli_connect($dbhost, $ dbuser, $dbpw)){ //if(!@mysqli_connect("localhost", "root", "root", "13306")){ if(!$link){ echo 'Data connection failed, please check carefully inc /config.inc.php configuration'; echo "Error: Unable to connect to MySQL." . PHP_EOL; echo "Debugging errno: " . mysqli_connect_errno() ; exit(mysqli_connect_error()); } $link=mysqli_connect(DBHOST, DBUSER, DBPW); $mes_connect.="<p class='notice'>Database connection successful!
";