The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.28 (Linux)
|
File Upload box validation - Printable Version +- Form Tools (https://forums.formtools.org) +-- Forum: Modules / Other (https://forums.formtools.org/forumdisplay.php?fid=8) +--- Forum: Form Validation: JS + PHP (https://forums.formtools.org/forumdisplay.php?fid=18) +--- Thread: File Upload box validation (/showthread.php?tid=2465) |
File Upload box validation - johna1954 - Jun 19th, 2013 Hi, I am going through the tutorial and have had success with validating email and text boxes. I tried to setup a file upload box and although the error shows up that the box is not filled in, when I select a file and then submit it fails and leaves the box blank. My rule is: $rules[] = "required,test1,Please add an image."; and Test1: <input type="file" name="test1" value="<?=htmlspecialchars(@$fields["test1"])?>" /><br /> for the field. I would appreciate being pointed in the right direction. Many Thanks John |