Hey guyz, am kinda new around here....am a web designer and also a web programmer, i currently code in php...i've been having problems with the mail function ever since i started coding.....i've also tried uploading my script to test online but it still does'nt work....below is the said script....i wanna plead with u guyz to at least take time out to review my script and help me check to see if there are any mistakes..
<?php
$form = "
<form action=\"test.php\" method=\"post\">
<input type=\"hidden\" name=\"seenform\" value=\"y\">
<b>Send us your comments!</b><br>
Your Name:<br>
<input type=\"text\" name=\"name\" size=\"20\" maxlength=\"20\" value=\"\"><br>
Your Email:<br>
<input type=\"text\" name=\"email\" size=\"20\" maxlength=\"40\" value=\"\"><br>
Your Comments:<br>
<textarea name=\"comments\" rows=\"3\" cols=\"30\"></textarea><br>
<input type=\"submit\" value=\"submit!\">
</form>
";
// If we haven't already seen the form ($seenform passed by hidden
// form value), show the form.
if ($seenform != "y") :
print "$form";
else :
$to = "lawillas4ever@yahoo.com";
$subject = "$name has sent you a comment";
$headers = "From: $email";
$message = "Good day Admin
A visitor to your website has just filled in a comment.
Find details below:
Name: $name
Email: $email
Comments: $comments";
$eno = "mail($to,$subject,$message,$headers)";
if( $eno):
print "Thank you $name for taking a moment to send us your comments!";
endif;
endif;
?>