Page 1 of 1

Internet Explorer Bug ?

Posted: Fri Oct 15, 2004 4:33 am
by Cammet
Hi Guys :D
I have built a login script that uses cookies. The script seems to allow the user to login if they are using firefox but if i use IE the user is told there password is wrong.

Login Form

Code: Select all

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Destination Transloader Login</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body><form name="form1" method="get" action="login.php">
<table width="80%" border="0" cellspacing="5" cellpadding="5" align="center">
  <tr>
    <td><div align="center"><img src="title.jpg" alt="Destination Transloader Available From http://disturbedmindz.com" width="382" height="39"></div></td>
  </tr>
  <tr>
      <td align="center"><font color="#666666" size="+2"><strong>Please Enter Your Password</strong></font></td>
  </tr>
  <tr>
    <td align="center"><input type="password" name="pass">   
        <input type="submit" name="Submit" value="Submit"></td>
  </tr>
  <tr>
    <td> </td>
  </tr>
  <tr>
      <td align="center"><font color="#666666"><strong>Destination Transloader V 
        2.0 © <a href="http://disturbedmindz.com" title="Disturbedmindz.com"><font color="#FF0000">Disturbedmindz.com</font></a> 
        2003 - 2004</strong></font> </td>
  </tr>
</table> </form>
</body>
</html>
Login.php

Code: Select all

<?php

if ($pass == "goodwife")
{
setcookie ("login", $pass);
echo ("Please Enter Destination <a href=index.php> Here </a>");
}
else
{
echo ("Your Password Is Incorrect, Please Hit Your Back Button And try Again.");
}

?>
It All seems pretty straight forward but i must be missing something or IE isnt working properly ? im using version 6.0.2600 of IE

Posted: Fri Oct 15, 2004 5:14 am
by mudkicker
try $_GET['pass'] instead $pass in login.php

Posted: Fri Oct 15, 2004 9:42 am
by Deemo
$pass would only work if register_globals is on, and that is a security issue

also, i dont see cookies anywhere, could you show us the line where the cookie is set?

Posted: Fri Oct 15, 2004 4:47 pm
by Cammet
Well my server has register globals on but I switched to the code you suggested and it worked I can log in with both explorer and FireFox. As for the cookie it’s on line 4 "setcookie ("login", $pass);" Its still in rough stages but you should get the jist 