Riverworld
New Member
Hey all...
I'm just trying to figure out what I've done wrong here... this script is meant to send the already saved information via email:
I'm just trying to figure out what I've done wrong here... this script is meant to send the already saved information via email:
Code:
<?
// Change [email]you@your.com[/email] to the email address you want to receive these at.
$admin = ("email-address@riverworld.net");
// Change YourSite.Com to your site's name. Can be Your Site or YourSite.com or whatever.
$sitename = ("Hermione.com.ru");
// These are your form's fields.
$FName = $_POST['FName'];
$LName = $_POST['LName'];
$username = $_POST['username'];
$subdomain = $_POST['subdomain'];
$password = $_POST['password'];
$mysql = $_POST['mysql'];
$email = $_POST['email'];
$alternate_contact = $_POST['alternate_contact'];
$Email = $_POST['Email'];
$Message = $_POST['Message'];
$submissiondate = date("D dS M, Y h:i a");
$ipaddress = GetHostByName($REMOTE_ADDR);
$filename= "reqcounter.txt" ; // Numbers the submissions of the form
$fd = fopen ($filename , "r") or die ("Can't open $filename") ;
$fstring = fread ($fd , filesize ($filename)) ;
fclose($fd) ;
$fd = fopen ($filename , "w") or die ("Can't open $filename") ;
$fcounted = $fstring + 1 ;
$fout = fwrite ($fd , $fcounted ) ;
fclose($fd) ;
// This is your formatted message.
$msg = "----- Website Submission -----\n\n";
$msg .= "Date/Time Submitted: $submissiondate - EST\n";
$msg .= "Submission ID: $fcounted\n\n";
$msg .= "IP address: $ipaddress\n;
$msg .= "Name: $FName $LName\n\n";
$msg .= "Address wanted: $username $subdomain\n\n";
$msg .= "Password: $password\n;
$msg .= "mySql: $mysql\n";
$msg .= "Email Address: $email\n\n";
$msg .= "Alternate contact: $alternate_contact\n;
$msg .= "Reason for wanting hosting:\n\n";
$msg .= "$Message\n\n";
$to = "$admin";
$subject = "$sitename Hosting Request No. $fcounted\n";
$mailheaders = "From: $FName $LName <$Email>\n";
$mailheaders .= "Reply-To: $FName $LName <$Email>\n";
mail($to, $subject, $msg, $mailheaders);
?>