if(isset($_POST['submit'])){
$cs_name = $_POST['name'];
$cs_email = $_POST['email'];
$cs_website = $_POST['website'];
$cs_comment = $_POST['comment'];
$cs_date = time();
if(empty($cs_name) or empty($cs_email) or empty($cs_comment)){
$error_msg = "ALL (*) feilds are Required";
}
else{
$cs_query = "INSERT INTO cms comments (id , date, name, username, post_id, email, website, image, comment, status) VALUES (NULL, '$cs_date', '$cs_name', 'user', '$post_id', '$cs_email', '$cs_website', 'unknown-picture.png', '$cs_comment', 'pending');";
if(mysqli_query($connection,$query)){
$msg = "Comment Has Been Submitted and waiting for approval";
}
else{
$error_msg = "Comment has not been not submitted";
}
}
}
(Added [code]...[/code]
tags ~ Mod.)