catonthecouchproductions
asked on
Easy PHP Email Script Question
I need to make a sender and a subject show up when the email is sent. Where would I put it?
<?php
$ip = $_POST['ip'];
$httpref = $_POST['httpref'];
$httpagent = $_POST['httpagent'];
$visitor = $_POST['visitor'];
$visitormail = $_POST['visitormail'];
$notes = $_POST['notes'];
$attn = $_POST['attn'];
$childsname = $_POST['childsname'];
$childsage = $_POST['childsage'];
$address = $_POST['address'];
$address2 = $_POST['address2'];
$city = $_POST['city'];
$state = $_POST['state'];
$zip = $_POST['zip'];
$dayphone = $_POST['dayphone'];
$evephone = $_POST['evephone'];
$class1 = $_POST['class1'];
$class2 = $_POST['class2'];
if(!$visitormail == "" && (!strstr($visitormail,"@") || !strstr($visitormail,".")) )
{
echo "<h2>Use Back - Enter valid e-mail</h2>\n";
$badinput = "<h2>Feedback was NOT submitted</h2>\n";
echo $badinput;
}
if (eregi('http:', $notes)) {
die ("Do NOT try that! ! ");
}
if(empty($visitor) || empty($visitormail) || empty($notes )) {
echo "<h2>Use Back Button To Make Changes</h2>\n";
}
$todayis = date("l, F j, Y, g:i a") ;
$attn = $attn ;
$subject = $attn;
$notes = stripcslashes($notes);
$message = "$todayis [EST] \n
Attention: $attn \n
From: $visitor ($visitormail)\n
Childs Name: $childsname \n
Childs Age: $childsage \n
Address: $address \n
Address2: $address2 \n
City: $city \n
State: $state \n
Zip: $zip \n
Class1: $class1 \n
Class2: $class2 \n
Daytime Phone: $dayphone \n
Evening Phone: $evephone \n
Message: $notes \n
";
$from = "From: $visitormail\r\n";
mail("info@shelburneartcen ter.org", $subject, $message, $from);
?>
Thanks
Ryan
<?php
$ip = $_POST['ip'];
$httpref = $_POST['httpref'];
$httpagent = $_POST['httpagent'];
$visitor = $_POST['visitor'];
$visitormail = $_POST['visitormail'];
$notes = $_POST['notes'];
$attn = $_POST['attn'];
$childsname = $_POST['childsname'];
$childsage = $_POST['childsage'];
$address = $_POST['address'];
$address2 = $_POST['address2'];
$city = $_POST['city'];
$state = $_POST['state'];
$zip = $_POST['zip'];
$dayphone = $_POST['dayphone'];
$evephone = $_POST['evephone'];
$class1 = $_POST['class1'];
$class2 = $_POST['class2'];
if(!$visitormail == "" && (!strstr($visitormail,"@")
{
echo "<h2>Use Back - Enter valid e-mail</h2>\n";
$badinput = "<h2>Feedback was NOT submitted</h2>\n";
echo $badinput;
}
if (eregi('http:', $notes)) {
die ("Do NOT try that! ! ");
}
if(empty($visitor) || empty($visitormail) || empty($notes )) {
echo "<h2>Use Back Button To Make Changes</h2>\n";
}
$todayis = date("l, F j, Y, g:i a") ;
$attn = $attn ;
$subject = $attn;
$notes = stripcslashes($notes);
$message = "$todayis [EST] \n
Attention: $attn \n
From: $visitor ($visitormail)\n
Childs Name: $childsname \n
Childs Age: $childsage \n
Address: $address \n
Address2: $address2 \n
City: $city \n
State: $state \n
Zip: $zip \n
Class1: $class1 \n
Class2: $class2 \n
Daytime Phone: $dayphone \n
Evening Phone: $evephone \n
Message: $notes \n
";
$from = "From: $visitormail\r\n";
mail("info@shelburneartcen
?>
Thanks
Ryan
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.