Hi,
At the moment, i use the script below to posts forms using php.
All is well, but it does not give the option of posting the email to more than one email address.
Ideally, I would like the script to pick up a list of email addresses from either a $email address table column or alternatively a text file, but if this is too complex, at least to have a CC function.
So, if you know how I could use this script to pick up a list of email addresses from a table field or a .txt that would be awsome, but a simple CC would be progress,
Thanks a lot,
vinny
<?
if (!isset($email) || !isset($message)) {
header( "Location: http://www.website.com/contact.php" );
}
elseif (empty($email) || empty($message) || empty($phone)) {
header( "Location: http://www.website/error.htm" );
}
else {
$email = $REQUEST['email'] ;
$message = $REQUEST['message'] ;
$name = $REQUEST['name'] ;
$phone = $REQUEST['phone'] ;
$company = $_REQUEST['company'] ;
mail( "info@website.com", "Web Enquiry",
"Name: $name\n\nEmail Address: $email\n\nPhone: $phone\n\nCompany: $company\n\nmessage: $message\n\n", "From: $email");
mail( "$email", "Thank you for your email",
"
Thank you $name,
We have received your email.
We will contact you shortly.
www.shatteredmusic.co.uk", "From: info@website.com" );
header( "Location: http://www.website.com/response.htm" );
}
?>