if(isset($_GET['delete'))
{
$id = mysql_real_escape_string($_GET['id']);
$query = "SELECT recipient FROM messages WHERE id = '$id'";
$result = mysql_query($query, $dbcnx);
$row = mysql_fetch_assoc($result);
if($row['recipient'] == $recipient)
{
$query = "DELETE FROM messages WHERE id = '$id'";
mysql_query($query, $dbcnx);
} else {
echo "<meta http-equiv='refresh' content='0; URL=?page=viewmsglist'>";
}
}
It's strange because I have my error reporting set to E_ALL and I never get the errors on this particular project, but with the layout of the site it exits code in the middle of tables so the layout completely breaks. The only time it does that is when i forget a ; or {}. I've stared for 20 minutes and can't see it. Thanks.
Edit: Earlier in the page:
$recipient = $_SESSION['username'];