Did you put in the die statement? I did not see it, please add this in and test the insert, instead of inserting it should go to a blank white screen with a message about the session variable.
In the future in you would like to post your pages please attach them to your post in a zip archive or a text file.