PHP CONNECTION WITH MYSQL | HOW WE MAKE A PHP CONNECTION WITH MYSQL | SHARAFAT HUSSAIN SOFTWARE DEVELOPER
MAKE A PHP CONNECTION WITH MYSQL FOLLOW THESE STEP...
Install xamp latest version
Run Apache and mysql services on control panel
Open C:\xampp\htdocs\
Make Directory in C:\xampp\htdocs\Android
Create a new php file on notepad or vs code editor.
Create mysql Database in localhost by opening it on any browser http://localhost/phpmyadmin/
After creat new db in mysql then open your connecton.php file in code editor and past the following code..
// Create connection
$conn = mysqli_connect($servername, $username, $password, $database);
// Check connection
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
}
echo "Connected successfully";
?>