Hello,
Can someone help me. I want to put this codes in an HTML section at the backend.
<form action="<? echo $_POST['self']; ?>" method="post">
<p>Your Full Name : <br />
<input name="name" type="text">
<br />
<br />
Friend's Email Address : <br />
<input name="email" type="text">
</p>
Your Message</br>
<br>
<label>
<textarea name="msg" id="textarea" cols="45" rows="5"></textarea>
</label>
<br />
<br />
<input name="Send" type="submit" value="Send">
</br>
</form>
<?
if (@$_POST['Send']=="Send")
{
$name=$_POST['name'];
$email=$_POST['email'];
$subject = $name. " recommends this site !";
$message= "Hello, \n\n" .$name. " thought you might be interested in visiting the following website : \n\nYour -
http://www.careplus-hhcl.com and sends the this message: ".$msg." \n\n\n\n\n\n\n\nNote: This message was not sent unsolicited. It was sent through a form located at
http://www.careplus-hhcl.com If you believe this message was received on error, please disregard it.";
$headers = 'From: care@careplus-hhcl.com' . "\r\n" . 'Reply-To: care@careplus-hhcl.com' . "\r\n" . 'X-Mailer: PHP/' . phpversion();
mail($email, $subject, $message, $headers);
echo "Your email was sent to: $email";
}
?>
It doesnt work. It give error when it is sent.
Thanks
Nene