I have an href link in my code that is calling the new_requisition.php, and i am also disabling it if it does not fulfill an argument. The code is below:
<?php
if ($row['req_status']=='Approved'){
echo '<a href="new_requisition.php?cid=<?php echo $cid;?>" class="btn btn-block btn-primary">
<i class="glyphicon glyphicon-shopping-cart text-blue"></i>
Add New Request
</a>';
} else {
echo "Not allowed to raise a PR";
}
?>
The $cid
is set prior with $_POST
follows:
$cid=$_POST['cid'];
I succesfully get the value passing from the previous page as this determines the data showing to this one but i cannot pass it to the next one.
My problem is that i cannot get it to pass the $cid
variable. When I click it what I get is:
new_requisition.php?cid=<?php%20echo%20$cid;?>
Instead of new_requisition.php?cid=3
for example, which creates me trouble as i need to insert the cid to the database.
Any ideas what am i missing?