<?
/* PHP based Contact form with multiple recipients. Receipients are loaded from a text file.
The script uses the PHP mail() function.
Programmed by Christian Haensel, christian@chftp.com, LINK1http://www.chftp.comLINK1
Exclusively published on weberdev.com. If you like my scripts, please let me know or link to me.
You may copy, redistirubte, change and alter my scripts as long as this information remains intact
*/
// The file containing the contact information
// Data line layout:
// Number;Name;Email;department
// like Christian Haensel;christian@chftp.com;Webdesign
$rec_file = "contacts.txt";
$rec = file($rec_file);
'.$sender_name.' is sending you the following message:
----------------------------------------------------------
'.$sender_msg.'
----------------------------------------------------------
The sender email address is '.$sender_email;
mail($contemail, $email_subject, $mail_text, $headers);
echo '<b>Thank you!</b><p>Your message has been sent to '.$contemail.'.';
}
?>
I was checking your code and was wondering how the textfile has to looks like..because i got this error while running in the webbrowser IE. In other words can I use this form directly or do I need to create this contacts.txt by myself and how??