Welcome Guest, Not a member yet? Register   Sign In
Multi upload file and validation form

I have a form with multi file upload, each file field I have a button to choose a file.
I use form validation but I have problem:
Assume that I have some file fields in view file

<input name="file1" type="file" />
<input name="file2" type="file" />

In my controller, to validate these file field I use structure of code as in Codeigniter User Guide following

$this->form_validation->set_rules('username', 'Username', 'callback_username_check');

when I select a file for "file1" and not select any file for "file2". In this time, I don't want to upload any file to my server if all field is required. But if use callback function. Each times I check for validate. "File1" will be uploaded to server.

Validation must be done with inspect $_FILES array, not like text box validation.

How can I retain file entry if form validation is not successful?

can do it everyone but i will try this than i call but now we should do more activity
Automated Forex Trading Software

Theme © iAndrew 2016 - Forum software by © MyBB