Jump to content

[SOLVED] php email


dezkit

Recommended Posts

<?php
$FullName = $_REQUEST["FullName"];
$Age = $_REQUEST["Age"];
$Phone = $_REQUEST["Phone"];
$Email = $_REQUEST["Email"];
$AIM = $_REQUEST["AIM"];
$Myspace = $_REQUEST["Myspace"];
$IP = $_SERVER["REMOTE_ADDR"];
$headers = "Content-type: text/html; charset=iso-8859-1";
$to = "[email protected]";
$subject = "Employment Application";
$body = "
  Full Name: $FullName<br>
  Age: $Age<br>
  Phone: $Phone<br>
  Email: $Email<br>
  AIM: $AIM<br>
  Myspace: $Myspace<br>
  IP Address: $IP<br>
";

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.xxx.com/site/">

 

why doesnt this work, i get a blank page.

Link to comment
https://forums.phpfreaks.com/topic/107001-solved-php-email/
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.