Board index   FAQ   Search  
Register  Login
Board index PHP PHP General

File Upload (not selected by user)

General discussions related to php

Moderators: macek, egami, gesf

File Upload (not selected by user)

Postby TedN » 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.


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

Re: File Upload (not selected by user)

Postby johnj » 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.
johnj
php-forum Super User
php-forum Super User
 
Posts: 1805
Joined: Thu Mar 10, 2011 5:07 pm


Return to PHP General

Who is online

Users browsing this forum: No registered users and 2 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron