I don't have much experience with php script but have enough knowledge (I think) to pull this off with some help. I am trying to create a script for an Opt-out form to remove somebody from a mailing list. Basically all I want it to do is retrieve the email to be removed from an html form and e-mail this info to an employee so he can remove it from the database. Here is the code that I am attempting to use:
Code: Select all
<?php
$to_1 = "test@test.net";
$subject = "Opt-Out Request";
$email = $_POST['e_mail'];
$msg = "Please remove me from your mailing list.\nE-Mail: $e_mail";
$path = "optout_sc.php";
$headers = "From:test@test.net\n";
$mail_status = mail($to_1,$subject,$msg,$headers);
if($mail_status){
echo "$path";
}
else{
echo "There has been an error processing your request";
}
?>Thank you very much for any help!