I guess you mean in PHP. Here's my old contact form. You'll have to modify it to your liking. Note: I didn't make this, so I won't be able to help with this.. <?php $target = "your@email.address"; if (($message) && ($from) && ($subject) && ($target) && ($fromname)) { $message = stripslashes($message); mail(" $target ", " $subject ", $message, "From: $fromname <$from>\r\n" ."Reply-To: $from\r\n" ."X-Mailer: PHP/" . phpversion()); echo "<br><br>Mail sent successfully, click <a href=\"$PHP_SELF\">here</a> to send another"; } else { echo " <form name=\"mail\" method=\"post\" action=\"$PHP_SELF\"> <table border=0> <tr> <td>Name:</td> <td><input class=\"editbox\" type=\"text\" name=\"fromname\"><br></td> </tr> <tr> <tr> <td>E-Mail:</td> <td><input class=\"editbox\" type=\"text\" name=\"from\"><br></td> </tr> <tr> <td>Subject:</td> <td><input class=\"editbox\" type=\"text\" name=\"subject\"><br></td> </tr> <tr> <td>Message:</td> <td><br></td> </tr> <tr> <td colspan=2> <textarea class=\"editbox\" name=\"message\" cols=\"80\" rows=\"10\"></textarea> </td> </tr> <tr> <td></td> <td><div align=\"right\"><input class=\"button\" type=\"submit\" name=\"Submit\" value=\"Send\"></div></td> </table> </form> "; } ?> As far as the "missing data" error, you'd use something like... if ((empty($blah1)) || (empty($blah2)) || (empty($blah3))) { $error = "yes"; } if ($error == "yes") { echo "You forgot something, dumbass"; }