• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

PHP help

dude8604

Platinum Member
I'm having a problem with this one line of my php script...

mysql_query("INSERT INTO pc VALUES("Grand Theft Auto 3","Action","Take-Two Interactive", "2002-05-22")");

and the error I get is
Parse error: parse error, unexpected T_STRING in c:\program files\apache group\apache\htdocs\setuprelease.php on line 30

Anyone know what's wrong with this? I have no idea. The database table "pc" exists, and has 4 fields like that, and I don't know what else it could be. Thanks.
 
I was running into a similar error when playing around with PHP and MySQL on my server.... I think it turned out to be a mismatched single quote or double quote (' or "), or I forgot to put in a semicolon (don't remember which offhand)... First thing I would do is check the lines before that one and make sure all the quote marks are lined up, and make sure you have the appropriate semicolons.

Thanks for the help in my PHP thread!

JW
 
Yes, JW310 is right, change the line to...
mysql_query("INSERT INTO pc VALUES('Grand Theft Auto 3','Action','Take-Two Interactive', '2002-05-22')");
...and it'll work.
 
it's also the fact that he has a double quote inside a double quote. the second double quote should be escaped.
 
Back
Top