Comment successfully submitted for approval!
"; } if (isset($_POST['submit'])) { $error = null; if ((!empty($_POST['name'])) || (!empty($_POST['url']))) { $error .= "No bots! "; } if (empty($_POST['username'])) { $error .= "Name is a required field. "; } if (empty($_POST['security'])) { $error .= "Please answer the security question. "; } if (empty($_POST['comment'])) { $error .= "Comment is a required field. "; } $name = strip_tags($_POST['username']); $url = strip_tags($_POST['website']); $security = $_POST['security']; $comment = htmlentities(strip_tags($_POST['comment'])); $_SESSION['name'] = $name; $_SESSION['url'] = $url; $_SESSION['comment'] = $comment; $error .= validateComment($name, $url, $security, $securitya, $comment); if ($error == null) { if ($approve) { $csvpath = "queue.csv"; } else { $csvpath = "entries.csv"; } $date = date("Y-m-d H:i:s"); addComment($csvpath, $name, $url, $date, str_replace(array("\r\n", "\r", "\n"), "Your comment could not be posted. See the following errors:
".$error."
"; } } include "templates/gb-header.php"; ?>