You have come from a wrong source to this page.

"; exit; } ######################################################################################## if (!$submit) { echo ""; $q = mysql_query("SELECT Title, Comments FROM comments WHERE CommentID = '$commentid'", $conn); while ($row = mysql_fetch_array($q)) { $title = $row['Title']; $comments = $row['Comments']; } echo " "; include('editcommentsform.php'); } ######################################################################################## if ($submit) { $title = isset($_POST['title'])?mysql_real_escape_string($_POST['title']):""; $comments = isset($_POST['comments'])?mysql_real_escape_string($_POST['comments']):""; if(!$title) { echo ""; echo "

Title is missing

"; echo $form; exit; } if(empty($comments)) { echo ""; echo "

Comments are Missing

"; echo $form; exit; } $q = mysql_query("UPDATE comments SET Title = '$title', Comments = '$comments' WHERE CommentID = '$commentid'", $conn); if ($q) { $_SESSION['message'] = "

Comment updated successfully

"; header("Location: ../comments.php"); } else { $_SESSION['message'] = "

There was some problem updating the database

"; header("Location: ../comments.php"); } } ######################################################################################## ?>