I still haven't got this to work, but I must be close. In the html page I enclosed the div with the buttons and java script in form tags with the action set to a php script:
The php script uploader2.php looks like:
The UI seems to work but the php script doesn't echo back that the file got uploaded or not.
I've done this kind of thing in perl before to let colleagues send me files to a directory protected by htaccess but I alway wished my perl version had a progress bar.
This signature line intentionally blank.