File Upload (not selected by user)
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.
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.
This thing that you want to do you cannot do. Or at least you're not supposed to be able to do. Web pages are supposed to exist in a bit of a sandbox to keep malicious pages and evil intent at bay. However, MSIE has lots of security holes. You can pull this off if the page has an HTA filename extension but it'll only work on MSIE and you'll get security warnings.
“The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
—Tim Berners-Lee, W3C Director and inventor of the World Wide Web
That's too bad. I'm a bit surprised as the PHP file would be on my server and the webpage is not for general consumption but my use only. Anyway, I guess the browser has to cover for all uses.
Thanks for your reply.
What is wrong with having a HTML page generated using PHP that is a form that is then posted to the server that then uses a script to make a hard copy of your inputs in a HTML page in a folder of your choice.
If your post falls off the page, bump it. ...
Please remember to wrap any code you have in forum tags:-
[CODE]...[/CODE] [HTML]...[/HTML] [PHP]...[/PHP]
If you can't think outside the box, you will be trapped forever with no escape...
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)