Hiya Everyone.
sign-guestbook.php - is the input form, see:
<p>
<TABLE border=0>
<TR>
<TD><font size="2"><font face="Century Gothic">
<b><font color="orange">Name:</b></font></TD>
<TD>
<form action="guestbook-entry.php" method="post" enctype="multipart/form-data">
<input type="text" size="20" maxlength="" name="name"></TD>
</TR>
<TR>
<TD><font size="2"><font face="Century Gothic">
<b><font color="orange">Email:</font></b></TD>
<TD>
<input type="text" size="20" maxlength="" name="email"></TD>
</TR>
<TR>
<TD><font size="2"><font face="Century Gothic">
<b><font color="orange">Website:</font></b></TD>
<TD>
<input type="text" size="20" maxlength="" name="website"><br /></TD>
</TR>
</TABLE>
<font size="2"><font face="Century Gothic">
<b><font color="orange">Comments:</font></b><br>
<textarea rows="5" cols="35" name="comments" wrap="physical"></textarea><br />
<p><center><input type="submit" value="Sign" name="submit"><br />
</form>
guestbook-entry.php displays the information so that the user can confirm before sending, like this:
<p>
<b><font color="orange">Name:</font></b> <?php echo $_POST["name"]; ?><br />
<b><font color="orange">Email:</font></b> <?php echo $_POST["email"]; ?><br />
<b><font color="orange">Website:</b></font> <?php echo $_POST["website"]; ?><br /><br />
<b><font color="orange">Comments:</b></font> <?php echo $_POST["comments"]; ?><br />
<p><b>I confirm that I wish to submit this entry to Antony's Guestbook and that it is not SPAM.
<p><b>Please note that spammers will have their I.P blocked.
<form name="name" type="hidden" value="<?php echo $_POST['name'] ?>">
<form name="email" type="hidden" value="<?php echo $_POST['email'] ?>">
<form name="website" type="hidden" value="<?php echo $_POST['website'] ?>">
<form name="comments" type="hidden" value="<?php echo $_POST['comments'] ?>">
<form action="guestbook-entry-submitted.php" method="post" enctype="multipart/form-data">
<p><center><input type="submit" value="Sign Guestbook" name="submit"><br />
</form><br /> </center>
This is the page that I'm having problems with I click the Sign Guestbook button and it clears the text displayed and adds to my address bar:
guestbook-entry.php?submit=Sign+Guestbook
Oh and the code for the guestbook-entry-submitted.php is:
<p>
<?
$name=$_POST['name'];
$email=$_POST['email'];
$website=$_POST['website'];
$comments=$_POST['comments'];
$to="antony.a@antonysimpson.com";
$subject="GUESTBOOK ENTRY";
$message="Name: $name \n Email: $email \n Website: $website \n Comments: \n $comments";
$from = "email";
$headers = "From: $email";
if(mail($to, "GUESTBOOK ENRTY", $message, "From: $email\n")) {
echo "Message Sent";
} else {
echo "Message not sent";
}
?>
Can anyone help?
Antony.