Where can I find out, and possibly change, how long files uploaded via html form are kept in the temporary directory before they are destroyed?
They are kept until the end of the script's execution. If at that point you haven't moved the files anywhere, they are deleted.
If you want to keep them longer, then use [man]move_uploaded_file/man and move them somewhere else.