Delete useless upload script
Remove unnecessary info in errors
Whitespace
Add attachment uploading code
Remove un needed redirects
Change query order so uploads work with last insert_id
Whitespace