fguy64
New Member
- Messages
- 218
- Reaction score
- 0
- Points
- 0
Hi this is day1 of my php education, and I'm running into problems early. I'm trying a simple redirect based on correct entry of a password. I checked a few sources and my code seems ok, but...
first my html form...
and here is my success.php
when I enter the correct password, I get...
Warning: Cannot modify header information - headers already sent by (output started at /.../.../success.php:8) in /.../.../.../success.php on line 13
first my html form...
Code:
<form action="success.php" method="post">
Password: <input type="password" name="password"> <input type="submit" />
</form>
and here is my success.php
Code:
<?php
$pwd = $_POST["password"];
if( $pwd == "123" ) {
header( "Location: success.htm" );
} else {
echo "nyeh";
}
?>
when I enter the correct password, I get...
Warning: Cannot modify header information - headers already sent by (output started at /.../.../success.php:8) in /.../.../.../success.php on line 13
Last edited: