Error in this line replace (`) with (') single quote. also remove space before root
$conn=mysql_connect('localhost',"root","") or die("Could not connect");
and best solution is use double quotes like this
$conn=mysql_connect("localhost","root","") or die("Could not connect");
also i mention that don't use mysql_*
. you should used mysqli_*
i have add some DB connectivity codes. used this code
<?php
$servername = "localhost";
$username = "root";
$password = "";
// Create connection
$conn = new mysqli($servername, $username, $password);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
echo "Connected successfully";
?>