I made a database on MySQL but when I am trying to login through PHP file I get 2 warnings:
Warning: mysql_query() expects parameter 1 to be string, object given in C:\Xampp\htdocs\login.php on line 7
Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, null given in C:\Xampp\htdocs\login.php on line 8
faileddddd
Connection.php
<?php
$mysql_usernmae="root";
$mysql_password="123";
$db="map";
$db= new mysqli('localhost',$mysql_usernmae,$mysql_password,$db);
echo "Connection successfull";
?>
Login.php
<?php
require "connection.php";
$user_name="123";
$user_pass="123";
$mysql_qry="select * from user_info where user_name like
' $user_name' and user_password like '$user_pass';";
$result=mysql_query($db,$mysql_qry);
if (mysqli_num_rows($result)>0)
{
echo "login Successsss";
}
else
{
echo "faileddddd";
}
?>