This question already has an answer here:
I am trying to pass value with page link to another page,but the other page is receiving the variable directly not its value.
sender page code
`
<?php
if(isset($_POST["view"])){
$connect = mysqli_connect("localhost","root","","ajmal");
$Email = $_POST["email"];
if ($_POST['view'] != '') {
$update_query = "UPDATE notification SET confirm_ststus=1 WHERE
confirm_to='$Email'";
mysqli_query($connect,$update_query);
}
$response='';
$query="SELECT * FROM notification WHERE confirm_to='$Email' ORDER
BY confirm_id DESC LIMIT 5";
$result=mysqli_query($connect,$query);
if(mysqli_num_rows($result) > 0){
while ($row=mysqli_fetch_array($result)) {
$orderID=$row["orderID"];
$response.='
<li>
<a href="cusDealerPDF.php?orderID=$orderID">
<strong>From : '.$row["confirm_from"].'</strong>
<br/>
<small><em>'.$row["confirm_text"].'</em></small>
</a>
</li>
';
}
}else{
$response.='<li><a href="" class="text-bold text-italic">No
Notification Found</a></li>';
}
$query_1 = "SELECT * FROM notification WHERE confirm_ststus=0 AND
confirm_to='$Email'";
$result_1 = mysqli_query($connect,$query_1);
$count = mysqli_num_rows($result_1);
$data = array(
'notification' => $response,
'unseen_notification' => $count
);
echo json_encode($data);
}
`
Receiver page code `
<?php
if (isset($_GET['orderID'])) {
echo $_GET['orderID'];
}
?>
`
at line <a href="cusDealerPDF.php?orderID=$orderID">
I am trying to send value containing by a variable $orderID
.The receiver page should print the value contained by variable $orderId
but it is directly printing the variable $orderID
..what to do?
</div>