I don't know the exact steps you followed, so I can't comment on what to change. There were some errors that I mentioned in the final result.
remember:
1) always use the same trigger for any actions that happen during a single process
2) If you use the simple question field, you have to manually add a session_start() call before the <!doctype> tag
3) File uploads should use the "Server File Name" binding when doing an insert or update
If you keep those things in mind, then I think your page would work.