IF statement in IE8

December 5, 2010 at 13:53:41
Specs: Windows XP
Hello, i got an annoying problem with IE8. I have a little admin login script, that WORKS fine in FireFox, but in IE not.

$password = $_POST['pswd'];
if($password == $admin_password)
$_SESSION['admin'] = true;
header("Location: admin.php");
header("Location: admin_login.php");

<form method="post" action="">
<input type="password" name="pswd"><br /><br />
<input type="submit" name="login" value="Зайти">

In IE the "else" part executes fine .. but the first part, that needs to set a cookie and redirect does not execute. In first part I tried to take out cookie and redirect code and place there just echo "123"; but nothing. It seems that first part is not executing at all if the password is ritght.

See More: IF statement in IE8

Report •

December 6, 2010 at 01:23:50
IE doesn't POST the value of submit buttons. Make the name='login' item 'hidden' and expect the submit button to only be client side.

Report •

December 6, 2010 at 02:40:19
Thank you :)

Report •

Related Solutions

Ask Question