function connect() { $con=mysqli_connect("localhost","root","","insan"); // Check connection if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); }else{ echo "Yes"; return $con; } }
$DSN ="localhost " // hostname $User="root" // the username $Password="password" // your password come in the $ conx = mysqli_connect($DSN,$User,$Password); // check if connection works if (mysqli_connect errno()) { echo "failed to connect to mysql".mysqli_connect_errno(); }else echo "connected :)" ; ?>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)