I have a file login.php to try to connect to my database. I put the file login.ph inside the server folder and started the server. Then i call the file in the browser and it shows a blank page. It does not respond even if i change the values of the database to an incorrect value. I don't know if the error is inside the code or if it is another problem. Thanks.
login.php:
<?php
$username = $_GET['fname'];
$password = $_GET['fpass'];
$con=mysqli_connect("localhost","user","pass","db");
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$qz = "SELECT contact_id FROM contacts" ;
$qz = str_replace("\'","",$qz);
$result = mysqli_query($con,$qz);
while($row = mysqli_fetch_array($result))
{
echo $row['contact_id'];
}
mysqli_close($con);
?>