Internet Explorer Bug ?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Cammet
Forum Newbie
Posts: 22
Joined: Thu Sep 23, 2004 8:00 am

Internet Explorer Bug ?

Post 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
Last edited by Cammet on Fri Oct 15, 2004 4:50 pm, edited 1 time in total.
User avatar
mudkicker
Forum Contributor
Posts: 479
Joined: Wed Jul 09, 2003 6:11 pm
Location: Istanbul, TR
Contact:

Post by mudkicker »

try $_GET['pass'] instead $pass in login.php
Deemo
Forum Contributor
Posts: 418
Joined: Sun Jan 18, 2004 11:48 am
Location: Washington DC

Post 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?
Cammet
Forum Newbie
Posts: 22
Joined: Thu Sep 23, 2004 8:00 am

Post 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 
Post Reply