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

Jason Handby jasonh at pavilion.co.uk
Tue Nov 5 05:56:10 CST 2002


Tarrant wrote:
> 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?

This doesn't work for the file input type -- it's considered a security
risk. Just imagine if you could have hidden file input controls with a
default value; you could pick up whatever files you wanted from a visitor's
PC!



Jason




More information about the thelist mailing list