Pls help! I am newbie here. I am followed the exactly code from online tutorial but the mail() function is still not working. Is that anything else i have to setup before hand. I am using PHP, HTTP Apache and MySQL in windows platform. Do i have to set validation in Apache or php.ini?
my code here is
<?php
if(isset($_POST['submit'])){
$to = "validemail@yahoo.com";
$subject = "Feedback for the website";
$body = "A user has entered feedback o the site!\n";
$body .= "Their feedback is: \n\n";
$body .= $feedback;
$headers = "From: adminstrator@email.com\n";
if(mail($to,$subject,$body,$headers)) {
echo "An e-mail was sent to $to with the subject: $subject";
} else {
echo "There was a problem sending the mail. Check your code and make sure that the e-mail address $to is valid";
}
print("<h2>Thanks for your feedback!</h2>");
}else{
?>
<form action="feedback.php" method="POST">
<h2>Please Send US your Feedback</h2>
<textarea cols=35 rows=15 name="feedback"></textarea>
<br>
<input type="submit" name="submit" value="Submit">
</form>
<?php
}
?>
thanks alot.
😕