Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
cannot update file upload field on form refresh
Old 08-12-2004, 01:29 PM cannot update file upload field on form refresh
Junior Talker

Posts: 2
Trades: 0
please help...

I have a form that contains a file upload field. Certain fields in the form must be filled in and so the form is validated. All this is in place and works. However, if the validation fails and the form has to be re-submitted I lose the information placed in the $_FILES['upload'] array - presumably because the file upload field on this submission was empty and the array was set to NULL.

I have had no success in automatically filling the file upload field with a previously submitted $_FILES['upload']['name'].

The form can be found at this address if you want a look:

http://braders.net/plop.php

Any help GREATLY appreciated.

Cheers, John
braders is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-12-2004, 02:48 PM
webwoRRks's Avatar
Ultra Talker

Posts: 426
Location: I hope so
Trades: 0
for security reasons, you can't automatically refill a input type="file" field. Also, if the file isn't moved, it will be destroyed as soon as the page script ends first time around with the fail. You could move it to your own temp directory, and peridically flush this directory for unused files....
__________________
Theres 10 types of people; those who understand binary, and those who don't.
webmaster and webdeveloper resources,
Please login or register to view this content. Registration is FREE
webwoRRks is offline
Reply With Quote
View Public Profile Visit webwoRRks's homepage!
 
Old 08-13-2004, 11:15 AM cheers
Junior Talker

Posts: 2
Trades: 0
thanks alot weBBworks - will try something else
braders is offline
Reply With Quote
View Public Profile
 
Old 08-13-2004, 02:18 PM
ACJavascript's Avatar
Humble Mod

Posts: 548
Location: CT, USA
Trades: 0
I suggest using Javascript as the FRIST measure to check the fields. So if somthings wrong you can keep the value in the file field.

Be sure to still check the fields in the php script, but this will help with regular users. (If you are using it for that purpose)
__________________

Please login or register to view this content. Registration is FREE
- 100 Satisfied Customers - Custom Programming and Web Development
ACJavascript is offline
Reply With Quote
View Public Profile Visit ACJavascript's homepage!
 
Reply     « Reply to cannot update file upload field on form refresh
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.42598 seconds with 12 queries