Jump to content

*SOLVED* HELP WITH A PARSE ERROR!!!


briguy9872

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.