Basically I'm trying to get the post data from my form page to link back to my php page and it won't post for whatever reason. I've been scrutinizing my code and looking online at other posts but have had no luck.
My html form:
<form id="form1" name="form1" method="post" action="anthonyBook.php">
<p>
<label for="name">name</label>
<input type="text" name="name" id="name" />
</p>
<p>
<label for="email">email</label>
<input type="text" name="email" id="email" />
</p>
<p>
<label>comments
<input type="text" name="comments" id="comments" />
</label>
</p>
<p>
<input type="submit" name="submit" id="submit" value="Submit" />
</p>
</form>
My php page:
<?php
echo '<a href="form1.html">sign my guest book</a>';
$guestbook = @fopen("sign.txt", "r");
while (!feof($guestbook))
{
echo "\n" . @fgets($guestbook) . "<br />";
}
@fclose($guestbook);
$datetime=date("y-m-d h:i:s");
$data = "<h1>" . $datetime . " \n" . $_POST['name'] . " \n" . $_POST['email'] . " \n" . $_POST['comments'] . "</br></h1>";
$guestbook = @fopen("sign.txt", "w");
echo @fputs($guestbook, $data);
@fclose($guestbook);
?>
Any help is appreciated