Jump to content

Archived

This topic is now archived and is closed to further replies.

briguy9872

*SOLVED* HELP WITH A PARSE ERROR!!!

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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>";

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.