Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can we make input type file as stricky in a form

Status
Not open for further replies.

amirkhansemail

Programmer
Jan 22, 2007
11
CA
1. How can we make input type file as sticky in a form

2. Also if we are uploading multiple files, how can we make the form sticky

thanks in advance.

 
i do not know of any consistent way to achieve this. If you think about it, being able to do this would be a major security hole.
 
and, i should add, what it the point of stickiness? after the form is initially posted, the server has the file in its systems. just store the file somewhere and bung the pathnames into a session variable or similar.
 
The point is to retain the values sent by the previous submit, in case the form fires back if a mandatory field is not filled by the user.

if values are sticked using value="<?php echo $abc; ?>" the end user does not have to fill the field again.

And as you mentioned, that's what exactly I want to know, how to store the dir and file names in PHP vars after submit???

Thanks
 
you don't need to do so (and you can't). if they were properly input before then, as i posted previously, you already have the files on your server. just store them somewhere whilst waiting for the invalid fields to be repopulated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top