Required for forms?

Not sure of the exact name for this but basically, I would like my form to be submitted ONLY if the name, email address, and message body are filled out. Right now, if you just hit submit, the form is sent to me, blank of course. How can this be done? Sorry for sounding like a n00b here, I'm really not, just stumped at the moment.

#493179

throw this in at the beginning of where ever your form action leads to

				if(empty($name) || empty($email) || empty($message )) {
echo "error fill in required fieldsn";
die ("");
}

you can also make sure people include the @ and . in their emails with

				if(!$mail == "" && (!strstr($email,"@") || !strstr($email,".")))  {
echo "erorr: use a real email address n";
die ("");
}

#493180

Great, thanks.

#493184