I have this as the form:
<form action="sendmail.php" method="post" name="subscribeForm"
id="subscribeForm">
<div style="padding:15;color:717171" class="ver10">
Name: <input type="text" name="name"
size="16">
Subscribe <input type="radio" value="subscribe"
checked name="subscribe">
<br><br>
E-mail: <input type="text" name="email"
size="16">
Unsubscribe<input type="radio" name="subscribe" value="unsubscribe">
<br><br>
<div align="center"><input type="image" border="0" name="submitImage"
value="submit" src="images/submit.gif"></div>
<br><br>
Sign up for news and updates! </div>
</form>
THIS IS THE CODE IN THE SENDMAIL.PHP file:
$name = $_REQUEST['name'];
$email = $_REQUEST['email'];
if (!empty($subscribe) AND !empty($unsubscribe))
{
echo("Please select either Subscribe or Unsubscribe. You cannot select
both at the same time.");
}
if(empty($name))
{
echo("Please go back and enter your name.");
die();
}
if(empty($email))
{
echo("Please go back and enter your email.");
die();
}
$subs = $_REQUEST['subscribe'];
$dataSent = 'Name: ' . $name . ' --- Email: ' . $email . ' ---
Request: ' . $subs;
mail( "chafasite@yahoo.com", "Betheltrips.com Subscribe-Unsubscribe
Contact Form", $dataSent, "From: $name" );
header( "Location:
http://www.betheltrips.com/wFlash/confirmation.php" );
THIS IS THE ERROR I GET ON THE BROWSER:
Warning: mail(): “sendmail_from” not set in php.ini or custom “From:”
header missing in C:\Apache2\htdocs\betheltrips\wFlash\sendmail.php on
line 24
Warning: Cannot modify header information - headers already sent by
(output started at C:\Apache2\htdocs\betheltrips\wFlash\sendmail.php:24)
in C:\Apache2\htdocs\betheltrips\wFlash\sendmail.php on line 25
What am I doing wrong? The From in the header is set on the script.
Please help. [hair]
Thanks in advance,
Leo