Why is it that when you start the do while loop you open the php and then just place the do{ then close it? I know that if you don't do that it wont run I've tested it many times different ways. I'm just curious to why you need to close it before the loop is finished.