Welcome Guest, Not a member yet? Register   Sign In
Can't get file input value
#1

[eluser]Unknown[/eluser]
I have a form with a file input field to allow users to upload image files.

Code:
<input id="petPhoto" type="file" value="photo" name="petPhoto">

The problem I'm having is that I can't get the value in this field when the form is submitted (e.g images/fileimage.jpg).

In my controller I have the following line to try to get the value but when I do a var dump on it, it just returns false.

Code:
$petPhoto = $this->input->post('petPhoto');

Does anyone know what I'm doing wrong?




Theme © iAndrew 2016 - Forum software by © MyBB