maryam shabbir
asked on
Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given in C:\xampp\htdocs\ecommerce\functions\functions.php on line 29
if(isset($_GET['add_cart'] ))
{
global $con;
$ip=getIp();
$pro_id = $_GET['add_cart'];
$check_pro="select * from cart where ip_add='$ip' AND p_id='$pro_id'";
$run_check=mysqli_query($c on,$check_ pro);
if(mysqli_num_rows($run_ch eck)>0)
{
echo "";
}
else
{
$insert_pro="insert into cart(p_id,ip_add)values('$ pro_id','$ ip')";
$run_pro=mysqli_query($con ,$insert_p ro);
echo
"<script>>window.open('ind ex.php','_ self')</sc ript>";
}
{
global $con;
$ip=getIp();
$pro_id = $_GET['add_cart'];
$check_pro="select * from cart where ip_add='$ip' AND p_id='$pro_id'";
$run_check=mysqli_query($c
if(mysqli_num_rows($run_ch
{
echo "";
}
else
{
$insert_pro="insert into cart(p_id,ip_add)values('$
$run_pro=mysqli_query($con
echo
"<script>>window.open('ind
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
With no further comments from the author, this solution provides the path to the answer.