Jump to content


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


Parse error: syntax error, unexpected T_STRING in ...

Recommended Posts

Hi all,

I am trying to create a file to enter some info into a db.  When I try to submit the data I am getting this error"

Parse error: syntax error, unexpected T_STRING in /home/blah/blah/blah/create_profile_process.php on line 69

Here is some of the code above and below line 69:
[code]//insert info into profile table
$comments2 = htmlspecialchars($comments);
$sql = mysql_query ("INSERT INTO profile (username, work, married, children, fdriver, ftrack, fmod, hobbies, hear, say, team, bman, bnmbr, cman, cnmbr, trman, trnmbr, tpman, tpnmbr, lmman, lmnmbr, aman, anmbr, gnman, gnnmbr, owman, ownmbr,)
VALUES('$username','$work','$married','$children','$fdriver','$ftrack','$fmod','$hobbies','$hear','$say','$team','$bman','$bnmbr','$cman','$cnmbr','$trman','$trnmbr','$tpman','$tpnmbr','$lmman','$lmnmbr','$aman','$anmbr','$gnman','$gnnmbr','$owman','$ownmbr') or die (mysql_error());
echo 'There has been an error creating your profile. Please contact the webmaster.';
$sql = "SELECT * FROM users WHERE username = '$username'";

$result = mysql_query($sql);

$user_array = mysql_fetch_array($result);[/code]

Now Line 69 is:
[code]$sql = "SELECT * FROM users WHERE username = '$username'";[/code]

Now I know it has got to be something I am overlooking and probably a simple fix, but I can't find it.

Thanks much in advance.


Share this post

Link to post
Share on other sites
LOL yup you are right, it is at the end of the latter part right before the "or die".  I also found I Was missing the ) there as well and then I found the ownmbr,) which I had to remove the ",".  Now it works fine.

Thanks for pointing out the missing " that pointed me in the right direction to fix and find the other 2 little issues.

Again Thank you

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.