A
Alt Prog
Guest
The code is:
<?php
if ($_POST['submit']){
$pswd = "password";
if ($_POST['passwd'] === $pswd){
echo "<html><head><title>Password
</title></head><body><a href='http://jayd.cedhost.com/password.php'>
Whatever.</a></body></html>";
}else{
echo "<html><head><title>Password
</title></head><body>Wrong password. Please try again.<br/>
<form method='post'>Password: <input type='password' name='passwd'/>
<input type='submit' name='submit' value='Submit'/></form></body></html>";
}
}else{
echo "<html><head><title>Password
</title></head><body><form method='post'>Password:
<input type='password' name='passwd'/>
<input type='submit' name='submit' value='Submit'/></form></body></html>";
}
?>
I have uploaded the page, the link is:
http://jayd.cedhost.com/password.php
The problem is when I type the right password it displays the original page. Do you know how to fix this?
<?php
if ($_POST['submit']){
$pswd = "password";
if ($_POST['passwd'] === $pswd){
echo "<html><head><title>Password
</title></head><body><a href='http://jayd.cedhost.com/password.php'>
Whatever.</a></body></html>";
}else{
echo "<html><head><title>Password
</title></head><body>Wrong password. Please try again.<br/>
<form method='post'>Password: <input type='password' name='passwd'/>
<input type='submit' name='submit' value='Submit'/></form></body></html>";
}
}else{
echo "<html><head><title>Password
</title></head><body><form method='post'>Password:
<input type='password' name='passwd'/>
<input type='submit' name='submit' value='Submit'/></form></body></html>";
}
?>
I have uploaded the page, the link is:
http://jayd.cedhost.com/password.php
The problem is when I type the right password it displays the original page. Do you know how to fix this?