PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I have a php search form with a couple fields. I want the user to be able to enter search criteria in a minimum of one field and then display the entire record from the mysql database in a HTML table. I found some code on the web but I botched something up. I get a Parse error: syntax error, unexpected T_IF in /home/claudett/public_html/membersarea/foodnexercise.php on line 349 error. Anyone care to assist?
Parse error: syntax error, unexpected T_IF in [...] on line 349
A bit of trivia: the "T" in "T_IF" stands for "Token". In the error, PHP is telling you that while it was parsing the tokens that make up your script, it found an "if" token when it was expecting something else. If you look before the unexpected "if", you will see that there is a semicolon missing from the statement on line 348.
Edit: This post was recovered from search engine cache.
Last edited by McInfo on Thu Jun 17, 2010 1:15 pm, edited 1 time in total.
Thanks McInfo. I was wondering why I was still getting the error. That semicolon did the trick, though now I am getting a new error message: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '`static` = '1' AND' at line 1. That's okay, at least now I know what to fix.