"; echo "

You have come from a wrong source to this page.

"; exit; } ######################################################################################## $form = "
Post Your reply

Reply By:





"; ######################################################################################## if (!$submit) { echo ""; $q_get_comment = mysql_query("SELECT Comments FROM comments WHERE CommentID = '$commentid'", $conn); while ($row = mysql_fetch_array($q_get_comment)) { echo "

$row[Comments]

"; } echo $form; } ######################################################################################## if ($submit) { if(!$replyby) { echo ""; echo "

Reply By field is missing

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

Reply box is empty

"; echo $form; exit; } $q = mysql_query("INSERT INTO comments_replies (ReplyID, CommentID, Reply, DateTime, RepliedBy) VALUES ('', '$commentid', '$reply', now(), '$replyby')", $conn) || die(mysql_error()); if ($q) { $_SESSION['message'] = "

Your reply is posted successfully!

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