BlackStones Posted May 13, 2014 Share Posted May 13, 2014 Here is the error code I am receiving; Parse error: syntax error, unexpected $end (line 41) The error message has consistently identified the statement in the else clause. Thanks for any help. <?php session_start(); ?> <!DOCTYPE html PUBLIC "-//W3C//DD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Blah</title> <link rel="stylesheet" type="text/css" href="defaultcss.css" /> </head> <body> <div id ="wrapper"> <h2>Blah Forum Demo</h2> <p>Creating basic login functionality</p> <?php if (!isset($_SESSION['uid'])) { echo "<form action = 'login_parse.php' method ='post'> Username: <input type ='text' name='username' /> Password: <input type ='password' name='password' /> Submit: <input type ='submit' name='submit' value='Log In' /> "; } else { echo "<p>You are logged in as ".$_SESSION['username']." • <a href='logout_parse.php'>Logout</a>; } ?> </div> </body> </html> Quote Link to comment https://forums.phpfreaks.com/topic/288466-hello-friends-experiencing-syntax-error-help-appreciated/ Share on other sites More sharing options...
Jacques1 Posted May 13, 2014 Share Posted May 13, 2014 Where's the closing quote? Quote Link to comment https://forums.phpfreaks.com/topic/288466-hello-friends-experiencing-syntax-error-help-appreciated/#findComment-1479370 Share on other sites More sharing options...
Solution BlackStones Posted May 13, 2014 Author Solution Share Posted May 13, 2014 I got it <3 Thanks Quote Link to comment https://forums.phpfreaks.com/topic/288466-hello-friends-experiencing-syntax-error-help-appreciated/#findComment-1479371 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.