i have a comment page and i want it to check if the name and comment is NULL before doing the query...heres what i have so far
<?php
include('config.php');
include("style.css");
$query=mysql_query("INSERT INTO comments VALUES ('','$name','$comment')");
echo("<body background='background3.JPG'><center>");
if ($name ==NULL){
echo("You didn't fill in your name!");
} elseif ($comment ==NULL) {
echo("You didn't have a comment!");
} elseif ($name ==NULL | | $comment ==NULL) {
echo("You didn't fill anything in!");
} elseif($query) {
echo("Comment Added <a href='/stats/comments.php'>Go Back</a>");
} else {
echo("Comment not added, please try again.");
}
echo("</center></body>");
?>