mak_gillett Posted November 15, 2007 Share Posted November 15, 2007 I don't know if this is a php problem (highly doubt it) but I don't know where else to ask this question. I am in the middle of building my website and testing it on my local computer using apache. I decided to move my login box from the content area up into the header\mast head and after I did this I am unable to log in when I am testing with IE 7.0. I get an http 404 not found when calling process.php. Now then it works perfectly when I am testing with Firefox. Anyone have any ideas? I know the code is fine as it is exactly the same code as before when it worked in IE 7 just located in a different spot on the page, and the fact it works perfectly when using Firefox. <?php if($session->logged_in) { echo "<div id=\"logon\" style=\"text-align: left; padding-top: 30px; padding-left: 20px; line-height: 15px;\">Welcome, <a href=\"http://localhost/member_services/\">$session->username</a> | <a href=\"http://localhost/scripts/process.php\">Logout</a> <br /> <a href=\"http://localhost/profile/inbox.php\">Messages:</a>"; $user = $session->username; $sql= "SELECT COUNT(*) AS message_check FROM `messages` WHERE reciever='$user' AND `opened` ='N'"; $res= mysql_query($sql) or die(mysql_error()); $message_check= mysql_result($res, 0, 'message_check'); echo " Unread: $message_check"; $sql = mysql_query ("SELECT pm_count FROM users WHERE username='$user'"); $row = mysql_fetch_array ($sql); $pm_count = $row['pm_count']; echo ", Total: $pm_count"; echo "</div>"; } else{ echo "<div id=\"logon\" style=\"padding-top: 10px;\"><form action=\"../scripts/process.php\" method=\"POST\"><label for=\"user\">Member Name: </label> <input id=\"user\" type=\"text\" name=\"user\" value=\"\" size=\"12\" /><br /> <br /><label for=\"pass\">Password: </label> <input id=\"pass\" type=\"password\" name=\"pass\" value=\"\" size=\"12\" style=\"border: 1px color: #000000\" /><br /> <br />Remember me:<input type=\"checkbox\" name=\"remember\""; if($form->value("remember") != "") echo "checked"; echo "<input type=\"hidden\" name=\"sublogin\" value=\"1\"><input type=\"submit\" value=\"Login\" class=\"button\" style=\"font-size:8pt\"/></form></div>"; } ?> I know it doesn't look pretty, I plan on cleaning it up once I get everything working. Anyone have any ideas? Quote Link to comment Share on other sites More sharing options...
btherl Posted November 16, 2007 Share Posted November 16, 2007 Does your html pass validation? There's no need to pass a super strict validation, just enough to ensure that there's no unmatched tags or similar problems. The reason I suspect this is that firefox and IE have different algorithms for dealing with invalid HTML. It's possible that firefox fixed broken html in one way, and IE fixed it in another way. Quote Link to comment Share on other sites More sharing options...
mak_gillett Posted November 16, 2007 Author Share Posted November 16, 2007 Thank you for the heads up. The entire page passed XHTML Strict 1.0 standards but once I thought about it the portion encapsulated within the php tags isn't being checked. Took a look at that portion independently and figured out my problem. It works now. Thanks for leading me in the right direction I was getting frustrated. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.