The concept: I want to set up a website that is a series of riddles. From the start page, you have to enter a set password to get to the next page, which will have a different riddle, and a different password.
a couple of the pages:
Code: Select all
<p> To continue, you must know. </p>
<form action="/answer.php" method="post">
<input type="text" maxlength="22" name="key" />
<input type="hidden" name="correctkey" value="ANSWER HERE" />
<input type="hidden" name="page" value="NAME OF CURRENT PAGE.PHP" />
<input type="hidden" name="nextpage" value="NAME OF NEXT PAGE.PHP" />
<input type="submit" value="GO" />
</form>
answer.php is:
Code: Select all
<html>
<?php
$key = $_POST['key'];
$correctkey = $_POST['correctkey'];
$page = $_POST['page'];
$nextpage = $_POST['nextpage'];
if ($key==$correctkey)
header ("Location: $nextpage");
else
header ("Location: $page");
?>
</html>In actuality, it isn't a huge matter of security, but I would really appreciate if I could make it so that you couldn't just right-click the page and find out the answers! XP