I'm making a website for a client and I am trying to get a form that will use the sendmail funciton in PHP. I don't really know all that much about php, so this is a little over my head. I found a pretty simple form online, although it doesn't work whatsoever, and I have no idea what is wrong with it.
<form method="post" action="sendmail.php">
Name: <input name="name" type="text">
<br />
Email: <input name="email" type="text" />
<br />
Message:
<textarea name="message" rows="10" cols="30">
</textarea>
<input type="submit" />
</form>
<?
$email = $_POST['email'] ;
$message = $_POST['message'] ;
mail(
webmaster@potsdamlacrosse.com, "Email Subject", $message, "From: $email" );
print "Congratulations your email has been sent";
?>
I'd also like to integrate an image verification function, so that the site doesn't get spammed to hell and back. I have that too, but I'd like to at least get the sendmial form working first.
TIA,
Pete