How to test a php login connected to a mysql db through xampp?
PHP Snippet 1:
include "../storescripts/connect_to_mysql.php";
PHP Snippet 2:
include "C:\xampp\htdocs\myonlinestore\storescripts\connect_to_mysql.php";
PHP Snippet 3:
<?php
$server = "localhost";
$connection = mysqli_connect ($server,"root","","your_database_name");
if(!$connection){
// if not connected it will gives the error here
echo "server not found".mysql_error();
}
else{
echo "Connected";
}
?>