SQL connection and check error
Set SQL connection and check error with error numbers.
<?php
$con = mysqli_connect("localhost","root","","testdb");
if(mysqli_connect_errno()){
echo "Faild to connect My SQL : ".mysqli_connect_error();
}
?>
<?php
$con = mysqli_connect("localhost","root","","testdb");
if(mysqli_connect_errno()){
echo "Faild to connect My SQL : ".mysqli_connect_error();
}
?>
Comments
Post a Comment