Forum Moderators: coopster
$to = "somone@domain.com"; $subject = "information im sending"; $email = $_REQUEST['email'] ; $phone = $_REQUEST['phone'] ; $headers = "From: $email"; $sent = mail($to, $subject, $phone, $headers) ;
<?php
if(isset($_POST['state'])) {
// PHP mail function here
$to = "user@domain.com";
$subject = "information i need";
$message = "Name:".$name."\n\r";
$message .= "Company:".$company."\n\r";
$message .= "Phone:".$phone."\n\r";
$message .= "Email:".$email."\n\r";
$message .= "Address:".$address."\n\r";
$message .= "City:".$city."\n\r";
$message .= "State:".$state."\n\r";
$mailheaders = "MIME-version: 1.0\r\n";
$mailheaders .= "content-type: text/plain; charset=UTF-8\r\n";
$mailheaders = "From: ".$email."\n\r";
mail($to_address, $subject, $message, $mailheaders);
// After mailing, do this
header("Location: {$state}.htm"); // redirect
exit(); // stop script execution
}
?>