0

Hello for some reason the SQL query will not run and it will not delete the row in the database. I was wondering if anyone has any idea why this is?

choosebid.php:

<td>
  <form method = "POST" action= "actionpage9.php">
    <input type="hidden" value="<?php echo $row['bid_id']?>" name="bid_id" />
    <input type="submit" class="btn btn-xlarge btn-block btn-primary" value ="decline" />
  </form>
</td>

actionpage9.php:

<?php
require 'config.php';

$bid_id    = $_POST['bid_id'];

$query   = "DELETE FROM bid WHERE 'bid_id' = '$bid_id'";
$success = $conn->query($query);

if (!$success) {
    die("Couldn't enter data: ".$conn->error);
}

header("location: choosebid.php");
$conn->close();
?>
Sarvan Kumar
  • 926
  • 1
  • 11
  • 27
James Wood
  • 13
  • 3

1 Answers1

0

Change your SQL statement from delete to drop