Simple PHP Question
Simple PHP Question
Out of context: Reply #15
- Started
- Last post
- 31 Responses
- ********0
put the PHP shit above the HTML setup... the PHP shit is basically meant to just proces the form, so it doesnt need any of the Html tags, and the html tags are what's fucking up the header redirect.
This should work:
----------------
<?php
//password
$pw = 'yahoo';if ($_POST['submit'] == 'Login')
{
//Check Password
if ($_POST['password'] == $pw)
//Send to Sekritz
header('Location: http://www.yahoo.com');
else
//load error note and proceed with the rest of the shit.
$error = 'Password Incorrect<p>';
}
?><html>
<head>
<title></title></head>
<body>
<form method="post" action="<?=$PHP_SELF;?>" name="sekrit">
<?=$error;?>
Please enter the password.
<p><input type="text" name="password">
<input type="submit" name="submit" value="Login">
</form></body>
</html>