scouser1985 Posted February 27, 2009 Share Posted February 27, 2009 Hi! I've started trying to Learn PHP and decided to jump into the deep end. I have a login page and it works well for Firefox, Chrome, Safari or basically any other web browser except Internet Explorer. Given that a vast majority of internet surfers use internet explorer it stands to reason that could be a big problem should I release the game. Here is the code: <?php session_start(); if(isset($_SESSION['player'])) { session_destroy(); } ?> <html> <head> <title>Knightly Realms</title> </head> <STYLE> a:link { color : #C1C4C6; text-decoration : none; } a:visited { color : #C1C4C6; text-decoration : none; } a:active { color : #C1C4C6; text-decoration : none; } a:hover { color :#666666; text-decoration : none; } </STYLE> <body background="images/bg.gif"> <div align="center"> <center> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#181818" id="AutoNumber1"> <tr> <td><img border="0" src="images/header.gif" width="800" height="101"></td> </tr> </table> </center> </div> <div align="center"> <center> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#181818" width="800" id="AutoNumber2" height="10"> <tr> <td height="1"></td> <td height="1"></td> <td height="1"></td> </tr> </table> </center> </div> <div align="center"> <center> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#181818" width="800" id="AutoNumber3" height="522"> <tr> <td width="144" valign="top" height="522"> <img border="0" src="images/navigation.gif" width="150" height="14"><br> <table border="1" cellpadding="2" cellspacing="2" style="border-collapse: collapse" bordercolor="#181818" width="150" id="AutoNumber4" height="9"> <tr> <td width="100%" bgcolor="3D3D3D" height="9" valign="top"> <p align="left"><font face="Verdana" size="1" color="#C1C4C6"> :: <a href="login.php">Home</a><br> :: <a href="register.php">Register</a><br> :: <a href="getpass.php">Lost Pass?</a><br> </tr> </table> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#181818" width="105%" id="AutoNumber5" height="1"> <tr> <td width="100%" height="1"> <img border="0" src="images/footer.gif" width="150" height="14"><br> </td> </tr> </table> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#181818" width="104%" id="AutoNumber11"> </table> </td> <td width="506" valign="top" height="522"> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#181818" width="450" id="AutoNumber12" align="center"> <tr> <td align="center"> <img border="0" src="images/content-large.gif" width="450" height="14"></td> </tr> </table> <table border="1" cellpadding="2" cellspacing="2" style="border-collapse: collapse" bordercolor="#181818" width="450" id="AutoNumber13" align="center"> <tr> <td bgcolor="3D3D3D" valign="top"> <font color="#FFFFFF" size="1" face="Verdana"><b> <!--content--!> <form method="POST" action="authenticate.php"> <center> Welcome to Knightly Realms. <BR>If you do not have an account you can signup for free <a href=register.php>Here</a><BR> If you have lost your password request a new <a href=getpass.php>Here</a>.<br> If you do have an account please login below.<P> Username: <input type="text" name="player" size="15"><br> Password: <input type="password" name="password" size="15" mask="x"><br> <P><input type=submit value=Login name=submit><P> <!--contentend--!> </td> </tr> </table> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#181818" width="450" id="AutoNumber14" align="center"> <tr> <td> <img border="0" src="images/footer-large.gif" width="450" height="14"></td> </tr> </table> <p align="center"><br> </td> <td width="150" valign="top" height="522"> </td> </tr> </table> </center> </div> <div align="center"> <center> <table border="1" cellpadding="2" cellspacing="2" style="border-collapse: collapse" bordercolor="#181818" width="800" id="AutoNumber25"> <tr> <td bgcolor="3D3D3D"> <p align="center"> </td> </tr> </table> </center> </div> </body> <center> </center> </html> The page itself works fine but the content box does not. Any ideas? (edited by kenrbnsn to replace the with tags) Link to comment https://forums.phpfreaks.com/topic/147131-page-not-working-with-ie/ Share on other sites More sharing options...
asmith Posted February 27, 2009 Share Posted February 27, 2009 I'm viewing your code by IE6 and it is showing me the content part in your code. Which is a form, right? Be more specific. Btw you haven't closed your form tag. You need to place </form> when your form area ends. Link to comment https://forums.phpfreaks.com/topic/147131-page-not-working-with-ie/#findComment-772413 Share on other sites More sharing options...
haku Posted February 27, 2009 Share Posted February 27, 2009 You have a lot of problems in your code: 1) No doctype 2) Deprecated tags (center) and attributes (align) 3) Your style tags are outside the head 4) You are using tables for layout, which is outdated (though not deprecated) If you want to release it, you will need to clean these things up. If you clean them up, you may find that your problems disappear. Link to comment https://forums.phpfreaks.com/topic/147131-page-not-working-with-ie/#findComment-772422 Share on other sites More sharing options...
shadiadiph Posted February 27, 2009 Share Posted February 27, 2009 haku is right no doctype try to get your page to validate at w3.org then it will work in all browsers Link to comment https://forums.phpfreaks.com/topic/147131-page-not-working-with-ie/#findComment-772481 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.