Looks like you are missing a few things. On the "if" line, you need a "{" before the ?>. It also looks like you you have a "do {" line, but no while condition that goes with that. So I think you can remove the do line as well. That should get it working.