retreive userid from post & write HTML file

also checks for and creates directory if neccesary
- still outputs html to screen, should be commented out at some point.