Question and answer is powered by AnsPress.io
I am a new comer in mysqli. So I want to connect mysqli to access database. Please help me.
To set MySQLi connection in PHP use this code
<?php $con = mysqli_connect("localhost","my_user","my_password","my_db"); // Check connection if connection error if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } ?>