dezkit Posted May 24, 2008 Share Posted May 24, 2008 is it possible so if the values are not set for $Email , $AIM , and $Myspace.. So it says "Not inputted in form." <?php error_reporting(E_ERROR | E_WARNING | E_PARSE); $FullName = $_REQUEST["FullName"]; $Age = $_REQUEST["Age"]; $Phone = $_REQUEST["Phone"]; $Email = $_REQUEST["Email"]; $AIM = $_REQUEST["AIM"]; $Myspace = $_REQUEST["Myspace"]; $IP = $_SERVER["REMOTE_ADDR"]; $headers .= "MIME-Version: 1.0\n"; $headers = "Content-type: text/html; charset=iso-8859-1\n"; $to = "[email protected]"; $subject = "Employment Application"; $body = " <br> <br> <br> <table> <tr> <td width=100>Full Name: <td>$FullName <tr> <td width=100>Age: <td>$Age <tr> <td width=100>Phone: <td>$Phone <tr> <td width=100>Email: <td>$Email <tr> <td width=100>AIM: <td>$AIM <tr> <td width=100>Myspace: <td>$Myspace <tr> <td width=100>IP Address: <td>$IP </table> </body> "; if($FullName == ""){ echo "An error has occurred, please go back."; } else { if (mail($to, $subject, $body, $headers)) { echo "<p><h2>Your application has been sent.</h2> <br>You be will automatically redirected to the home page in a couple of seconds.</HEAD></p>"; } else { echo "<p><h2>Your application has not been sent.</h2> <br>You will be automatically redirected to the employment page in a couple of seconds.</HEAD></p>"; } } ?> <meta http-equiv="REFRESH" content="4;url=http://www.xx.com/site/"> Quote Link to comment https://forums.phpfreaks.com/topic/107097-email-php/ Share on other sites More sharing options...
dezkit Posted May 24, 2008 Author Share Posted May 24, 2008 is it even possible? Quote Link to comment https://forums.phpfreaks.com/topic/107097-email-php/#findComment-549069 Share on other sites More sharing options...
dezkit Posted May 24, 2008 Author Share Posted May 24, 2008 is anybody here? wow. Quote Link to comment https://forums.phpfreaks.com/topic/107097-email-php/#findComment-549089 Share on other sites More sharing options...
serverman Posted May 24, 2008 Share Posted May 24, 2008 something like the <?php if ($AIM = ""){ echo "Not inputted in form.";} else { echo $AIM; } .... something like that or you could do like this <?php if(!$email || !$fullname) { die("Fill the form properly!"); }?> Quote Link to comment https://forums.phpfreaks.com/topic/107097-email-php/#findComment-549093 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.