user profiles: T_VARIABLE issue

Post here is you are having problems with any of the tutorials.
Post Reply
darshthanki
Posts: 1
Joined: Fri Sep 28, 2012 12:49 am

user profiles: T_VARIABLE issue

Post by darshthanki »

Hey,

I'm getting the T_VARIABLE parse error on line 20 when I try to load the pages. It's occuring on the init.inc.php page.

Here's my script:


// Connect to server and select database.
mysql_connect("$host", "$username", "$password")or
die("cannot connect" . mysql_error());
mysql_select_db("$db_name")or die("cannot select DB" . mysql_error());

$path = dirname(_FILE_);

include("{$path}/inc/user.inc.php);"

$_SESSION['uid'] = 1;

?>
note: I exluded the db information.
User avatar
EcazS
Posts: 789
Joined: Fri May 06, 2011 5:29 pm

Re: user profiles: T_VARIABLE issue

Post by EcazS »

include("{$path}/inc/user.inc.php);"
This line is wrong, you're "closing" the statement with the semicolon and the ending parenthesis BEFORE the ending quote.
So change it to this,
include("{$path}/inc/user.inc.php");
Post Reply