"; echo "

You have come from a wrong source to this page.

"; exit; } ######################################################################################## if (!$submit) { echo ""; $q = mysql_query("SELECT RepliedBy, Reply FROM comments_replies WHERE ReplyID = '$replyid'", $conn); while ($row = mysql_fetch_array($q)) { $replyby = $row['RepliedBy']; $reply = $row['Reply']; } include('editrepliesform.php'); } ######################################################################################## if ($submit) { $replyby = isset($_POST['replyby'])?mysql_real_escape_string($_POST['replyby']):""; $reply = isset($_POST['reply'])?mysql_real_escape_string($_POST['reply']):""; if(!$replyby) { echo ""; echo "

Reply By field is missing

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

Reply is Missing

"; echo $form; exit; } $q = mysql_query("UPDATE comments_replies SET RepliedBy = '$replyby', Reply = '$reply' WHERE ReplyID = '$replyid'", $conn); if ($q) { $_SESSION['message'] = "

Reply updated successfully

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

There was some problem updating the database

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