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();
}
?>

Comments

Popular posts from this blog

WP register_post_type() with custom CMB2 meta box

Git post receive setup at server for git push to the production from local machine