Jump to content


Photo

*SOLVED* HELP WITH A PARSE ERROR!!!


  • Please log in to reply
1 reply to this topic

#1 briguy9872

briguy9872
  • Members
  • PipPip
  • Member
  • 11 posts

Posted 02 April 2006 - 11:34 PM

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
<?
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>";

}

?> 
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.


#2 toplay

toplay
  • Staff Alumni
  • Advanced Member
  • 973 posts

Posted 03 April 2006 - 12:14 AM

Change this:

print "Please <a href="http://www.tbanskorn.../login.php">Log in</a>";


to this:

print 'Please <a href="http://www.tbanskorn.../login.php">Log in</a>';


or this:

print "Please <a href=\"http://www.tbanskorner.com/mail/login.php\">Log in</a>";




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users