View Single Post
05-24-2008, 01:18 PM
#4
creativejen is offline creativejen
Status: Paladin
Join date: Jul 2006
Location: Sheffield, UK
Expertise: design, front-end markup
Software: Photoshop
 
Posts: 2,353
iTrader: 25 / 96%
 

creativejen is an unknown quantity at this point

Send a message via MSN to creativejen

  Old

Simple way is like this;

PHP Code:
<?php

if($email == "") {

echo 
"You must enter your email!";

} else {

mail();

}

?>
But you add as many error check as you like. Expanding on the above..

PHP Code:
<?php

if($name == "") {

echo 
"Give me your name dammit!";

}

if(
$subject == "") {

echo 
"Enter a subject!";

}

if(
$email == "") {

echo 
"You must enter your email!";

} else {

if(
$comments == ""){

echo 
"Comments - Empty!";

} else {

mail();

}

?>