Does he just want something like:
Code:
$id=$_POST['id'];
if ($id=="1232343") {
print("
<head>
<script type=\"javascript\">
window.location='nextpage.html';
</script>
<body>
</body>");
}
else {
print("
<head>
<script type=\"javascript\">
setTimeOut("window.location='javascript.go:history(-1)'",5000);
</script>
<body>
ID wrong, please try again.
</body>
}
Then a form as so:
Code:
<form action="thephp.php" method="post">
<input type="text" name="id" value="Type ID in here.">
<input type="submit" value="Check ID">
</form>
That is very simple, should work just fine for 1, 2, 3, up to maybe 6 IDs but if more then you shouldn't use this method most likely.
Also someone had best check to make sure the "javascript.go:history(-1) is right, I believe it is but I can't be sure.
Tim
Bookmarks