briguy9872 Posted April 2, 2006 Share Posted April 2, 2006 hey. im relatively new at php. I have a file called: forindex.php(which will eventually be merged with index.php)here is the code [code]<?include 'dbconnect.php';session_start();?><?if (isset($_SESSION['user'])) { $user = $_SESSION['user']; $getuser = "SELECT * from register where userid='$user'"; $getuser2 = mysql_query($getuser) or die("Could not get user info"); $getuser3 = mysql_fetch_array($getuser2);print "Welcome, $_SESSION[user]"; }else{print "Please <a href="http://www.tbanskorner.com/mail/login.php">Log in</a>";print "Or<a href="http://www.tbanskorner.com/mail/register.php>Register</a>";}?> [/code]What comes back is a parse error saying: Parse error: parse error, unexpected T_STRING in /home/content/t/b/a/tbanskorner/html/forindex.php on line 19. PLEASE HELP!!!! Thanks in advance. Link to comment https://forums.phpfreaks.com/topic/6430-solved-help-with-a-parse-error/ Share on other sites More sharing options...
toplay Posted April 3, 2006 Share Posted April 3, 2006 Change this:print "Please <a href="http://www.tbanskorner.com/mail/login.php">Log in</a>";to this:print 'Please <a href="http://www.tbanskorner.com/mail/login.php">Log in</a>';or this:print "Please <a href=\"http://www.tbanskorner.com/mail/login.php\">Log in</a>"; Link to comment https://forums.phpfreaks.com/topic/6430-solved-help-with-a-parse-error/#findComment-23308 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.