Jump to content

email php


dezkit

Recommended Posts

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/">

Link to comment
https://forums.phpfreaks.com/topic/107097-email-php/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.