I have an HTML file which is downloaded from my server to my PC. I add entries into various text boxes and then would like to upload the file including the text box values back to my server but in a different folder. I am using localStorage() on my HTML file.

It seems that all of the PHP scripts I've found for file uploading require the user to select a file on the PC and then upload it. I don't wish to select a file, I just want to provide the file name (my html file) to the PHP script from say, javascript.

My idea is to simply place an upload.php file on my server and send it the name of my html file.

I would appreciate it some could provide the essential lines of PHP script to upload a file without user file selection.


Thanks,