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. Quote Link to comment 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>"; 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.