macattack Posted December 26, 2008 Share Posted December 26, 2008 I am building a simple login script that will work with a MySQL database to allow administrator access to the site. For some reason the script stops executing immediately after the title. As I am currently still working on the site, error_reporting() is set to e_all and no errors come up. Here is the code: <?php include ("header.php"); ?> <h2 class='center'>Administrator Login</h2><br/> <h3> <form action="admin_login.php?login='yes' method='POST'> Username: <input type='text' name='login'><br/> Password: <input type='password' name='pass'><br/> <input type='submit' value='Login'><br/> </form> </h3> <?php include ("footer.php"); ?> Everything up until the <form> tags comes up just fine. After that, the page is blank. The form does not display either. This same template is used on every single page and works just fine everywhere else. If anyone has an idea that may lead to a solution that would be great. Thanks in advance! Quote Link to comment Share on other sites More sharing options...
Lumio Posted December 26, 2008 Share Posted December 26, 2008 Load your page and look at the source-code. You have a little mess with quotes. use double Quotes (") for html-attributes, as <h2 class="center"> and not single one (') If this is XHTML you must use double-quotes. Your problem right now is the following line: <form action="admin_login.php?login='yes' method='POST'> Can you see, that you closed the quote? I can't. Quote Link to comment Share on other sites More sharing options...
carrotcake1029 Posted December 26, 2008 Share Posted December 26, 2008 Can you show us what html source is actually showing up? Usually right click->view source. Edit: never mind, Lumio found it Quote Link to comment Share on other sites More sharing options...
macattack Posted December 26, 2008 Author Share Posted December 26, 2008 That was it! It actually solved an older problem with another code that I had left to die too. It's weird that such a simple mistake slipped by. Must be something to do with the fact that it's the morning after Christmas. Thank you for your help. 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.