Parse error syntax error unexpected '{ ' on line
Hi
I am working on my Guest Entry which connect mysql databse. I am getting error saying "Parse error syntax error unexpected "{" Here is my code <?php $username='#####'; $password='#####'; $hostname='#####.db'; $databsename='#####'; $conection = @mysql_connect($hostname, $username, $password); mysql_select_db($hostname,$conection); $SQL="SELECT*From Guestbook"; $Content= mysql_query($SQL); while ($rs= mysql_fetch_array( mysql_query($SQL)) { echo "$rs[EntryText]"; } ?> i don't see any problem but i am new to php. Thank you |
Well, in the 'while line, you've got 3 '(', but only 2 ')' so that's a problem.
You should try an editor with syntax highlighting eg vim. Personally for loops, i like to line up the start/end parentheses vertically. Easier to eyeball that they match up. |
thank you!!! it works now!! thanks again!!
|
All times are GMT -5. The time now is 09:59 AM. |