Re: Parse error: syntax error, unexpected '}'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Mark Sargent <powderkeg@xxxxxxxxxxxxxxxx>:

Hi All,

can anone see what's wrong with the below code? I get this error,


*Parse error*: syntax error, unexpected '}' in
*/usr/local/apache2/htdocs/moviedata2.php* on line *18

*
$age=1;
while($age<=100) {
$insert = "INSERT INTO age (age_label) VALUES ($age)";
$results = mysql_query($insert) or die(mysql_error());
$age++
}


There's a semi-colon missing at the end of the last line ($age++).

Hope thi shelps,
Rick
--
Rick Emery

"When once you have tasted flight, you will forever walk the Earth
 with your eyes turned skyward, for there you have been, and there
 you will always long to return"
                                              -- Leonardo Da Vinci

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux