Re: file upload

From: Date: Mon, 25 Oct 2004 21:25:10 +0000
Subject: Re: file upload
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-200293@lists.php.net to get a copy of this message
You can't, at least you SHOULDN'T. Just think about what you're asking for, you want to download a file from a users computer, without them knowing about it. Major security/privacy issues there that browsers try to prevent. Chris Victor C. wrote:
Hi, I'm trying to submit a file from "index.php" to "index2.php". I know how to do file upload in PHP. On "index.php" I have: <FORM ACTION="index2.php" METHOD=POST ENCTYPE="multipart/form-data"> <INPUT TYPE="file" NAME="myfile" SIZE=30> <INPUT TYPE="submit" NAME="Upload File"> </FORM> The next page would only need to use $HTTP_POST_FILES['myfile'] to access the submitted file. My question is: if I already know which file I want to submit, say "file1.xml". How can I just ask "index.php" to submit "file1.xml" to "index2.php"? Without asking the users to pick the file to upload? Thanks a lot in advance!


« previous php.general (#200293) next »