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.119.109.235
Current File : /var/www/html/site_shopudiet/postcode_check.php |
<?php
include 'dbconnect.php';
$url = $_SERVER['HTTP_REFERER'];
$id=$_REQUEST['id'];
session_start();
// echo $no_of_item;
// echo $id;
$squery = "select * from postcose where id='$id'";
$result = mysqli_query($conn,$squery);
//$i=mysqli_num_rows($result);
//$j=1;
$row = mysqli_fetch_array($result);
$post_code=$row['postcode'];
$post_place=$row['place'];
$_SESSION['post_code']=$post_code;
$_SESSION['post_place']=$post_place;
$_SESSION['default'] = 0;
echo $post_code;
echo $post_place;
if(mysqli_query($conn,$squery)){
header('location: '.$url.'');
}
else{
echo"not inserted".mysqli_error();
}
mysqli_close($conn);
?>