Re: Re-populating File field in form - won't work??

From: Date: Mon, 14 Oct 2002 20:14:01 +0000
Subject: Re: Re-populating File field in form - won't work??
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-119948@lists.php.net to get a copy of this message
I think it's a "security" feature to prevent people from doing things like inserting a hidden file field with a pre-defined value (e.g.: "/etc/passwd") and then tricking the user to unwittingly submit the form. The same probably applies to all browsers. On Mon, 2002-10-14 at 16:05, Monty wrote: > I have a few File input fields in a form so people can upload images. If > there's an error with the form, I want to re-populate the fields with the > values the user filled in. This works for all the fields except the File > fields. When I check the HTML output to the browser, I do see that the value > parameter (value="filename.jpg") is set for the File field, however, when > viewing the form the field appears blank. Also, if you leave it blank and > click Submit, I get an error stating it was empty, so, clearly the File > field is blank and not showing the default value that has been set. > > Is this my browser (IE 5.5 on Mac) or does a File field not accept default > values?? > > Thanks! > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.general (#119948) next »