I am trying to make a contact page but the form wont work. Here is a copy of both my html and php.
<body>
<h1 id="title">Joerassic Park</h1>
<div id="navt">
<a href="index.html">Home</a> | <a href="about.html">About Me</a> | <a href="contact.html">Contact Me</a>
</div>
<div id="content">
<center>
<form action=”contact.php” method=”post”>
Name: <input type=”text” name=”name”>
<br /><br />
Email: <input type=”text” name=”email”>
<br /><br />
Message:
<br />
<textarea name=”message” rows="10" cols="30"></textarea>
<br /><br />
<input type="submit" value="Submit">
</form>
</center>
</div>
</body>
PHP:
<html>
<body>
<?php
$to = “xyz@somedomain.com”;
$subject = “Contact Form”;
$name = $_POST['name'];
$email = $_POST['email'];
$message = $_POST['message'];
$headers = “From: $email”;
$sent = mailto($to,$subject,$name,$message,$headers);
if($sent){
print('<a href=”contact.html”>Thank you. Click here to return to site.</a>')
}else{
print “There was an issue with your contact form”;
}
?>
</body>
</html>
The Goal is to have them fill out the form then have it email me directly the results.