Im trying to make a file upload in CodeIgniter, how ever when I add enctype="multipart form-data" no post data will go through. At all not even the other fields. However when i dont add it, i can get the other post data, but of course no file upload. Whats going wrong here. Here is my view and controller:
View:
<h2>Add a New Album</h2>
<form enctype="multipart/form-data" method="post" action="<?php echo base_url();?>index.php/photo/newAlbum">
<table style="margin-left:5px;">
<tr>
<td> Album Name:</td>
<td><input type="text" name="name" /></td>
</tr>
<tr>
<td> Photo .zip File:</td>
<td><input type="file" name="userfile" size="20" /></td>
</tr>
<tr>
<td></td>
<td><input type="submit" value="Upload Photo File" /></td>
</tr>
</table>
</form>
controller only contains:
var_dump($_POST);
Result is:
array(0) { }