Page is a not externally linkable
Adam5000 - 4:01 am on Mar 17, 2011 (gmt 0)
Hi everyone.
I've got a little piece of code left to put in and it's about to make me lose my religion.
It seems simple really but I'm not having any luck with it.
What I'm trying to do is automatically send a visitor from page one to page two if the right words (in this case Corn flakes) are keyed into an html form.
It's like keying in a password to get from page one to page two.
Below is the code I've got. Page one is saved as page_one.php
Help!
<html>
<head>
<title>Page one</title>
</head>
<body>
<form action="page_one.php" method="post">
<input type="text" name="field_one" id="field_one">
<input type="submit" name="button" value="Enter">
</form>
<body>
<?php
if
($_post[field_one] != "Corn flakes")
echo "Wrong words";
else
//automatically send the visitor to page two. www.domain_name.com/page_two.htm
?>
</body>
</html>