![]() |
The set_value() can't use with teyp="file"?(Solved) - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: The set_value() can't use with teyp="file"?(Solved) (/showthread.php?tid=39369) |
The set_value() can't use with teyp="file"?(Solved) - El Forum - 03-09-2011 [eluser]fell0206[/eluser] Hello, I'm encountered a problem. When I followed the "user guide" of "file uploading class", I want value can be re-populating, so I add "set_value...", but it can't work, how can I fix it? Thank you! My Code: <input type="file" name="Image1" id="Image1" class="text-input medium-input" value="<?php echo set_value('Image1'); ?>" > The set_value() can't use with teyp="file"?(Solved) - El Forum - 03-09-2011 [eluser]InsiteFX[/eluser] Code: // CodeIgniter User Guide! InsiteFX The set_value() can't use with teyp="file"?(Solved) - El Forum - 03-09-2011 [eluser]danmontgomery[/eluser] You can't re-populate file inputs. This isn't a codeigniter limitation, but an HTML limitation (if we're calling it a limitation, which I don't really think it is). Regardless, set_value() checks POST data, and uploaded files are in $_FILES, not $_POST. If you want to repopulate a file upload field, you would need to store the file regardless of form validation and note that a file has been uploaded another way. The set_value() can't use with teyp="file"?(Solved) - El Forum - 03-09-2011 [eluser]fell0206[/eluser] OK! I known, thank you for your help. |