Uname : Linux V-ShopU01 4.18.0-348.20.1.el8_5.x86_64 #1 SMP Thu Mar 10 20:59:28 UTC 2022 x86_64
Server : Apache/2.4.37 (rocky) OpenSSL/1.1.1k
Whoami : apache
Safe Mode : OFF
DOCUMENT ROOT : /var/www/html/site_shopudiet
Disable Function :
Path : /var/www/html/site_shopudiet/

Server IP : 65.20.74.164 Client IP : 18.222.179.161
Current File : /var/www/html/site_shopudiet/otp_action.php
<?php
session_start();
include 'dbconnect.php';
$otp=$_POST['otp_num'];
$otp1=$_POST['otp_num2'];
$phone=$_POST['phone_reg'];
if($otp==$otp1){
         $sql= "SELECT * FROM customer WHERE phone ='$phone' AND status='1' ";
         $result=mysqli_query($conn,$sql);
         $count = mysqli_num_rows($result);
         
         if ($count > 0) 
        {
            while($row = mysqli_fetch_array($result)) {
              $_SESSION['id']=$row['id'];
              $_SESSION['name']=$row['name'];
              $_SESSION['email']=$row['email'];
              $_SESSION['phone']=$row['phone'];
              
              $user_id=$row['id'];
              $name=$row['name'];
              $email=$row['email'];
              $phone=$row['phone'];
            }
        }
	if(isset($_SESSION['cart_id'])){
	$cid=$_SESSION['cart_id'];
	 $s = "SELECT * FROM product_cart WHERE cart_id='$cid' AND phone=''";
	    $res=mysqli_query($conn,$s);
    $cou = mysqli_num_rows($res);
    if($cou > 0){
	    header('location:cart.php');
    } else {
        header('location:home.php');
    }
  }
  else{
	header('location:home.php');
  }
}
else {
          echo ("<script>
alert('Incorrect OTP');
window.location.href='login_shop.php';
</script>");
}
?>