daveoffy Posted November 25, 2009 Share Posted November 25, 2009 So on my login-exec.php page it just stops. It doesn't redirect me to the page. In firefox it works fine. <?php require_once 'config.php'; require_once 'var.php'; if(isset($_POST['Login'])) { $username = md5($_POST['username']); $password = $_POST['password']; if($username == '') { header('Location: ../lf.php?reason=invalid'); exit; } if($password == '') { header('Location: ../lf.php?reason=invalid'); exit; } $aqry = "SELECT * from members WHERE username_md5='$username' AND active='1'"; $aresult = mysql_query($aqry); if($aresult) { if(mysql_num_rows($aresult) == 0) { header('Location: ../lf.php?reason=active'); exit; } } $bqry = "SELECT * from members WHERE username_md5='$username' AND banned='1'"; $bresult = mysql_query($bqry); if($bresult) { if(mysql_num_rows($bresult) == 1) { header('Location: ../lf.php?reason=banned'); exit; } } $qry="SELECT * FROM members WHERE username_md5='$username' AND password='".md5($password)."'"; $result=mysql_query($qry); if($result) { if(mysql_num_rows($result) == 1) { $getid = "SELECT id FROM `members`WHERE username_md5='$username'"; $getidresult = mysql_query($getid); while($row = mysql_fetch_assoc($getidresult)) { $username_id = $row['id']; mysql_query("UPDATE members SET lastip='".$ip."' WHERE username_md5 = '".$username."'"); mysql_query("UPDATE members SET last_login='".$date."' WHERE username_md5 = '".$username."'"); header('Location: ../index.php'); exit; } }else { header('Location: ../lf.php?reason=invalid'); exit; } } } ?> Quote Link to comment https://forums.phpfreaks.com/topic/182930-ie-header-not-working-tested-in-5-7-and-8/ Share on other sites More sharing options...
mrMarcus Posted November 25, 2009 Share Posted November 25, 2009 you still test in IE5? why? and for your "issue", i have no idea what header or what page it doesn't redirect you to, so we're all going to have to wait for you to come back again and explain your issue much better, when you could've just done so the first time. any errors? anything happen? anything at all? when does it "just stop"? what did you do to make it "just stop"? etc., etc., etc., etc. Quote Link to comment https://forums.phpfreaks.com/topic/182930-ie-header-not-working-tested-in-5-7-and-8/#findComment-965524 Share on other sites More sharing options...
daveoffy Posted November 25, 2009 Author Share Posted November 25, 2009 It stops when you go in IE and login. The page it stops on is login-exec. It doesn't run any of the login commands. It doesn't seem to go in any of the IF statments. There are no given errors on the page. Nothing happens, just a blank white screen on the login-exec.php page. Quote Link to comment https://forums.phpfreaks.com/topic/182930-ie-header-not-working-tested-in-5-7-and-8/#findComment-965698 Share on other sites More sharing options...
oni-kun Posted November 25, 2009 Share Posted November 25, 2009 I'm not sure if this will fix it, But place ob_start at the TOP of your php code, before any white space. This may rectify the header issues, since it starts an output buffer. <?php ob_start(); //Start output buffer require_once 'config.php'; Quote Link to comment https://forums.phpfreaks.com/topic/182930-ie-header-not-working-tested-in-5-7-and-8/#findComment-965703 Share on other sites More sharing options...
daveoffy Posted November 25, 2009 Author Share Posted November 25, 2009 Problem Fixed. The problem was the if(isset)) on the top. IE doesn't like caps in the name I guess. Quote Link to comment https://forums.phpfreaks.com/topic/182930-ie-header-not-working-tested-in-5-7-and-8/#findComment-965728 Share on other sites More sharing options...
mrMarcus Posted November 26, 2009 Share Posted November 26, 2009 the names are case-sensitive. if your form has name="login" and your check has isset ($_POST['Login']), your script will not function. EDIT: next time, post all relevant code (HTML form). any number of people on here would've pointed that out immediately and this would've been solved 2 minutes after you began this thread. guaranteed. just a note for next time. Quote Link to comment https://forums.phpfreaks.com/topic/182930-ie-header-not-working-tested-in-5-7-and-8/#findComment-965734 Share on other sites More sharing options...
PFMaBiSmAd Posted November 26, 2009 Share Posted November 26, 2009 Since all browsers handle letter-case of form field names the same, best guess is that the actual problem was due to using a image as a submit button. Quote Link to comment https://forums.phpfreaks.com/topic/182930-ie-header-not-working-tested-in-5-7-and-8/#findComment-965736 Share on other sites More sharing options...
daveoffy Posted November 26, 2009 Author Share Posted November 26, 2009 Yea, I was using an image button. Well thanks for all the help. where did the topic solved button go? Quote Link to comment https://forums.phpfreaks.com/topic/182930-ie-header-not-working-tested-in-5-7-and-8/#findComment-965839 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.