magie Posted March 27, 2009 Share Posted March 27, 2009 i have tryed making a big login system, where ppl have to activate and all that, but i get this error all the time, what am i doing wrong Parse error: syntax error, unexpected T_IF in /home/twossdow/public_html/magie/login.php on line 3 <?php if (!isLoggedIn()) { // user is not logged in. if (isset($_POST['cmdlogin'])) { // retrieve the username and password sent from login form & check the login. if (checkLogin($_POST['username'], $_POST['password'])) { show_userbox(); } else { echo "Incorrect Login information !"; show_loginform(); } } else { // User is not logged in and has not pressed the login button // so we show him the loginform show_loginform(); } } else { // The user is already loggedin, so we show the userbox. show_userbox(); } ?> Link to comment https://forums.phpfreaks.com/topic/151398-advanced-login-problem/ Share on other sites More sharing options...
Silverado_NL Posted March 27, 2009 Share Posted March 27, 2009 usually these errors consist of a non closed if statement before the actual line that seems to be bugging. try looking into your isLoggedIn() function and see if everything is closed as it should be'. if this page is included by other pages, you should check those pages for non closed if statements u can test your current code without the isLoggedIn() function by replacing the if (!isLoggedIn()) with if(TRUE) hope this helps. Link to comment https://forums.phpfreaks.com/topic/151398-advanced-login-problem/#findComment-795222 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.