Danny
March 5th, 2005, 19:54
Hey,
http://www.dannyweb.net/proto/contact.htm
Got the page layout exactly how i want etc, but the contact form is working except when i recieve an e-mail the sender is unknown. How do i define a name or something so i can tell easily where the form is from?
<?php
$youremail = "info@dannyweb.org";
$subject = "$select";
$thankyou = "thankyou.php";
if($email == ""){
?>
No email address added. Please go back.<br/>
<?php
}elseif($name == ""){
?>
No name added. Please go back.<br/>
<?php }elseif($message == ""){
?>
No message added. Please go back.<br/>
<?php
}else{
$msg = ereg_replace("\\\'", "'",
$message);
$msg = ereg_replace('\\\"', "\"", $msg);
$message1 = "from: $name\nemail:
$email\nmessage:\n$msg1";
mail($youremail, $subject, $msg, "From:
$email\r\nReply-to: $email\r\n");
?>
Thats the code im using.
http://www.dannyweb.net/proto/contact.htm
Got the page layout exactly how i want etc, but the contact form is working except when i recieve an e-mail the sender is unknown. How do i define a name or something so i can tell easily where the form is from?
<?php
$youremail = "info@dannyweb.org";
$subject = "$select";
$thankyou = "thankyou.php";
if($email == ""){
?>
No email address added. Please go back.<br/>
<?php
}elseif($name == ""){
?>
No name added. Please go back.<br/>
<?php }elseif($message == ""){
?>
No message added. Please go back.<br/>
<?php
}else{
$msg = ereg_replace("\\\'", "'",
$message);
$msg = ereg_replace('\\\"', "\"", $msg);
$message1 = "from: $name\nemail:
$email\nmessage:\n$msg1";
mail($youremail, $subject, $msg, "From:
$email\r\nReply-to: $email\r\n");
?>
Thats the code im using.