[thelist] <input type="file" value attr?

Chris Marsh chris at webbtech.co.uk
Tue Nov 5 06:10:01 CST 2002


> Hello, I have a file input type and I am looking for it to
> hold a value of the location of the members current photo,
> for instance something like this.
>
> <input type="file" name="photopath" value="<? echo $photo; ?>">
>
> However this does not want to work, so I am guessing it's
> cause the file input type doesn't have a value attribute, any ideas?

AFAIK it is a security limitation. You cannot programmatically set the
value of a file element to prevent a bad man from setting the value,
hiding the element and then waiting for you to unwittingly upload files
from your hard drive when submitting a form.

Regards

Chris Marsh





More information about the thelist mailing list