Welcome Guest, Not a member yet? Register   Sign In
Trouble with image upload
#1

[eluser]NateL[/eluser]
Just doing the beginning stages of uploading an image to application...

I have my form:

Quote:<?php
echo form_open_multipart('classifieds/submit');
<p>Upload an Image:<br />&lt;?php echo form_upload('image') ?&gt;</p>

When I click Submit, all of the other input fields come through in the POST data, however, nothing comes in under "image"...am I missing something simple here?
#2

[eluser]nicholas.byfleet[/eluser]
You might want to read the following page of the user manual:
http://ellislab.com/codeigniter/user-gui...ading.html

Hope this helps
#3

[eluser]BrianDHall[/eluser]
Oh, you are looking in the wrong place - 'image' won't appear in _POST, because it creates an entirely different variable - use var_dump($_FILES) to see what you are really getting.

Hint: when you get to do_upload(), be sure to pass it your form input field name, as in:

Code:
$this->upload->do_upload('image');




Theme © iAndrew 2016 - Forum software by © MyBB