Hello I need some help on Php
Posted: Sat Dec 25, 2010 8:52 am
I am a rookie at php and all I need is to create a php page to send information in a form to my email account. This website is for a friend so I will be changing the email when I am done to her email. I have attached my php page that I have started and all i want to happen right now is to get a simple email to my account just to see when it works so if anyone could help me out It would be much appreciated.
<?php
$name=$_POST['name'];
$address=$_POST['address'];
$city=$_POST['city'];
&email=$_POST['email'];
$email_from='myemail@yahoo.com';
$email_subject="Foster Form Submission";
$email_body="hello";
$to="myemail@yahoo.com";
$headers = "From: $email_from /r/n";
$headers .="Reply-To: $email /r/n";
mail($to,$email_subject,$email_body,$headers);
?>
<?php
$name=$_POST['name'];
$address=$_POST['address'];
$city=$_POST['city'];
&email=$_POST['email'];
$email_from='myemail@yahoo.com';
$email_subject="Foster Form Submission";
$email_body="hello";
$to="myemail@yahoo.com";
$headers = "From: $email_from /r/n";
$headers .="Reply-To: $email /r/n";
mail($to,$email_subject,$email_body,$headers);
?>