The following error is coming in my program
Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in C:\Users\joshi\Documents\EasyPHP-12.1\www\a.php on line 5
The code is as follows:
$con = mysqli_connect("localhost","root","","search");
$str = "Akshat";
$result = mysqli_query($con,"SELECT * from index WHERE name LIKE '%$str%'");
while($row = mysql_fetch_assoc($result))
{
echo "Name: " . $row["name"];
echo "<br>Desc: " . $row["desc"];
}