Apparently you forgot to enclose this if statement and your while loop with } symbols:
PHP Code:
if(is_numeric($id)){
PHP Code:
while ($i < 1) {
You have five { symbols but only three }, which is not consistent with PHP syntax. Try to add two more } to the appropriate locations of your php file and it should work then.
Edit: Guess you've figured out how to resolve this syntax error? Thats good, have fun coding!