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_shopudietDisable Function :
Path : /var/www/html/site_shopudiet/
Server IP : 65.20.74.164
Client IP : 18.191.178.68
Current File : /var/www/html/site_shopudiet/otp_send.php |
<?php
session_start();
include 'dbconnect.php';
$otp=$_POST['otp_num'];
$otp1=$_POST['otp_num2'];
$name=$_POST['name'];
$email=$_POST['email'];
$phone=$_POST['phone'];
if($otp==$otp1){
$ciphering = "AES-128-CTR";
$iv_length = openssl_cipher_iv_length($ciphering);
$options = 0;
$encryption_iv = '1234567891011121';
$encryption_key = "GeeksforGeeks";
$epass = openssl_encrypt($pass, $ciphering,
$encryption_key, $options, $encryption_iv);
$ecpass = openssl_encrypt($cpass, $ciphering,
$encryption_key, $options, $encryption_iv);
$status=1;
$query="select * from customer where email='".$email."' or phone='".$phone."'";
$res_u = mysqli_query($conn,$query);
if (mysqli_num_rows($res_u) ==0) {
$sql="insert into customer(name,email,phone,status) values ('$name','$email','$phone','$status')";
mysqli_query($conn,$sql);
$_SESSION['id']=mysqli_insert_id($conn);
$_SESSION['name']=$name;
$_SESSION['email']=$email;
$_SESSION['phone']=$phone;
if(isset($_SESSION['cart'])){
header('location:cart.php');
}
else{
header('location:home.php');
}
}
else{
$_SESSION["error"]="Email or Phone Number already exists";
header('location:register.php');
}
}
else{
header('location:login_shop.php');
}
?>