RSprinkel Posted September 16, 2006 Share Posted September 16, 2006 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 69Here 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());if(!$sql){ 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.RSprinkel Quote Link to comment Share on other sites More sharing options...
markbett Posted September 16, 2006 Share Posted September 16, 2006 your missing a " in one of your sql queries... ;-) took me about 15 seconds to find... Quote Link to comment Share on other sites More sharing options...
RSprinkel Posted September 16, 2006 Author Share Posted September 16, 2006 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.