Re: Re: upload file - clients path to file?
| From: | Jasper Bryant-Greene | Date: | Tue, 30 Aug 2005 10:45:42 +0000 |
| Subject: | Re: Re: upload file - clients path to file? | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-221581@lists.php.net to get a copy of this message | ||
angelo@zlogic.co.za wrote:
Well basically i need it for an "add products" page and if the users doesnt fill in all the fields correctly I display some error message as well as populate the textfields and dropdown lists with the values they previously entered, so if they entered/selected the file I want to display it again so they don't have to upload the file again. I know that I could do it without the user knowing (backed) but then they might think they have to select the file again because the upload field will be blank.Please don't top-post. You can *NEVER* set an initial value for a file upload field. This would be a HUGE security risk. Imagine (on a Linux system): <input type="file" name="myfile" value="/etc/passwd"> You need to alter your design so that this is unnecessary, for example as suggested by someone else -- don't display the upload box and display a message saying it is already uploaded, maybe with a link to re-upload. Jasper