However I'd suggest checking your mysql query. It seems it must be turning some sort of bare result at the top because there seems to be a check there to see if its pulling info from the db if the id is set otherwise set all the variables as blank, which would be fine if it worked.