For some reason this isn’t deleteing it from the database D=
Here is my code:
[code]<?php
require_once ‘header.php’;
require_once ‘connect.php’;
//This code runs if the form has been submitted
if (isset($_POST[‘submit’])) {
while($row = mysql_fetch_array($result))
{
// now we insert it into the database
$insert = (“DELETE FROM ‘items’ WHERE ‘id’ = '”.$_GET[‘id’]."’");
$add_member = mysql_query($insert);
}
?>
Item Deleted
<?php } else { $result = mysql_query("SELECT * FROM `items` WHERE `id` = '".$_GET['id']."'"); while($row = mysql_fetch_array($result)) { ?>Item Name: | <?php echo $row['itemName'];?> |
Item Description: | <?php echo $row['itemDesc'];?> |
Picture URL: | <?php echo $row['itemPic'];?> |
Price: | <?php echo $row['itemPrice'];?> |
Note: We have not given options to edit price and button codes to stop confusion.
<?php } } ?> [/code]Any help would be greatly appreciated.
-Jordan