BillyBoB Posted May 27, 2007 Share Posted May 27, 2007 I have a login form that works in Firefox but it doesnt work in IE. If somebody could help me that would be great! <?php ob_start(); include("config.php"); if(!$logged) { if(!$_POST['login']) { ?> <table cellspacing="0" cellpadding="0" border="0" width="124"> <tr> <td align="left"> <form method="POST"> <table cellspacing="0" cellpadding="0" border="0" width="124"> <tr> <td> Username: </td> </tr> <tr> <td style="background: url('images/textbox.gif') no-repeat;" height="16"> <input type="text" height="16" name="username" class="login"> </td> </tr> <tr> <td> Password: </td> </tr> <tr> <td style="background: url('images/textbox.gif') no-repeat;" height="16"> <input type="password" height="16" name="password" class="login"><br/><br/> </td> </tr> <tr> <td> <div align="center"> <input type="image" src="images/loginbutton.gif" name="login" value="Login"> </div> </td> </tr> </table> </form> </td> </tr> </table> <br/> <?php }else{ $username = $_POST['username']; $password = md5($_POST['password']); $info = mysql_query("SELECT * FROM members WHERE username = '$username'") or die(mysql_error()); $data = mysql_fetch_array($info); if($data[password]!=$password) { echo("Wrong Password! Try again. <meta http-equiv=\"Refresh\" content=\"2;\"/>"); }else{ $query = mysql_query("SELECT * FROM members WHERE username = '$username'") or die(mysql_error()); $user = mysql_fetch_array($query); setcookie("id", $user[id],time()+(60*60*24*1), "/", ""); setcookie("pass", $user[password],time()+(60*60*24*1), "/", ""); $newtime = time(); $time = gmdate("YmdHis", $newtime); $ip = $_SERVER['REMOTE_ADDR']; $lquery = mysql_query("UPDATE members SET ip = '$ip' , lastlog = '$time' WHERE username = '$username' ") or die(mysql_error()); echo ("<meta http-equiv=\"Refresh\" content=\"3; \"/>Login Successful"); } } }else{ echo(" CONSOLE "); } ?> Thanks in advance EDIT: This site is still in beta so, I can only allow you to the login page. http://animeblogsite.com/beta/ htaccess username and password: Username: BetaTester Password: happyhelper234 Login Page Username and Password: Username: Beta Password: happyhelper234 Quote Link to comment Share on other sites More sharing options...
BillyBoB Posted May 27, 2007 Author Share Posted May 27, 2007 Anyone Here know whats wrong? Quote Link to comment Share on other sites More sharing options...
gabeg Posted May 27, 2007 Share Posted May 27, 2007 A php script should work the same no matter the browser because it's processed on the server. Because it's a login script I recommend clearing cookies/history, etc., and trying to see if it works then. Quote Link to comment Share on other sites More sharing options...
BillyBoB Posted May 27, 2007 Author Share Posted May 27, 2007 it didnt work because of the html it had a image as a button so that it could look better i have set it up to have an image if its firefox and if its IE to have a Submit button. Quote Link to comment Share on other sites More sharing options...
gabeg Posted May 27, 2007 Share Posted May 27, 2007 it didnt work because of the html it had a image as a button so that it could look better i have set it up to have an image if its firefox and if its IE to have a Submit button. I thought you had an error with the php in IE, hence the PHP forum. For next time, letting people know what the error is might help you get the problem solved quicker. Quote Link to comment Share on other sites More sharing options...
BillyBoB Posted May 27, 2007 Author Share Posted May 27, 2007 I didnt know what was wrong all i know is that i had php in there.... so I put in on the php help forum.... so why dont you back off.... Quote Link to comment Share on other sites More sharing options...
gabeg Posted May 28, 2007 Share Posted May 28, 2007 I didnt know what was wrong all i know is that i had php in there.... so I put in on the php help forum.... so why dont you back off.... whoa relax there buddy. All im saying is that letting people know what the error actually is, is an important step in the debugging process. 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.