Reputting input files into fields

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Reputting input files into fields

Post by shiznatix »

Ok the topic title sucks but bear with me.

I have a form, if there where some errors in that form (empty field, etc) then I want the fields that where wrong to lose their value but the other ones keep their value so the user does not have to type everything out. This is done, no problem at all.

The problem comes with files they will be uploading with this form. Is there a way of saving the file location from their HD and then putting that back into the file box so they don't have to go through all those again?
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

It isn't possible for security reasons, the value of a file field can't be set, neither from HTML or JavaScript.

Otherwise i could trick you into uploading any file from your computer that i wanted
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Post by shiznatix »

Pimptastic wrote:It isn't possible for security reasons, the value of a file field can't be set, neither from HTML or JavaScript.

Otherwise i could trick you into uploading any file from your computer that i wanted
thats what I was thinking but i was hoping that there was some sort of way to do it.

le sigh
Post Reply