Hello,
I am attempting to delete records from my database and each time I do I get an error. I have two pages. The first page displays a number of records, to the right of each record is a delete option. The delete option when clicked goes to delete.php
Here is my code for the main page.
<?php do { ?>
<?php echo $row_DeletePost['user']; ?><?php echo $row_DeletePost['Title']; ?><?php echo $row_DeletePost['Date']; ?><a href="Delete.php">Delete</a><br/>
<?php } while {$row_DeletePost = mysql_fetch_assoc($DeletePost)); ?>
This is the code for the delete page...
<?php
require_once('Connections/Forum.php');
$id = $row_DeletePost['Title'];
mysql_connect("$hostname_Forum", "$username_forum", "$password_Forum") or die("cannot connect");
mysql_select_db("$database_Forum")or die("cannot select DB");
$query='Delete from forum where Title = $id;
$result=mysql_query($query);
?>