For some reason when I click the cancel button it should run through the Cancel isset mysql query but it doesn't. It only passes through the mysql query when I make it a $_GET instead of a $_POST. Not entirely sure whats happening.
if(isset($_POST["Cancel"])) {
$sCancel = $dbh->prepare("
UPDATE MaterialOrders
SET `cancelledByUid` = :uid,
`cancelled` = 'true'
WHERE `idMaterialOrders` = :idMaterialOrders
");
$sCancel->bindValue(":uid", $_SESSION["uid"]);
$sCancel->bindValue(":idMaterialOrders", $_GET["oid"]);
if ($sCancel->execute()) {
$sCancel->closeCursor();
}
}
<a href="includes/orderItems.php?Cancel=true&oid=<?php print $_GET['oid']; ?>" class="supplierMaterial" target="_blank">
<input type="button" value="Cancel Order" name="Cancel" id="Cancel">