File Upload (not selected by user)

General discussions related to php

Moderators: egami, macek, gesf

Post Reply
New php-forum User
New php-forum User
Posts: 11
Joined: Sat Feb 23, 2013 8:00 pm

Sat Jul 27, 2013 9:10 am

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.


php-forum Super User
php-forum Super User
Posts: 1803
Joined: Thu Mar 10, 2011 5:07 pm

Mon Jul 29, 2013 8:55 am

you haven't mentioned clearly how you are downloading the file, initially.

if you do not want to fill the file name then give a default file name, so that the file is autofilled and you can skip the step which requires user selection.

Post Reply