CodeIgniter Forums

Full Version: [Solved] How to unset($this->input->post('submit'));
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]babazumbula[/eluser]
Hello,
I made a gallery with picture upload. The form in the view is
Code:
<?php echo form_open_multipart('gallery'); ?>
<input type="file" name="userfile" value="Choose" />
<input type="submit" value="Upload" name="submit" />
<?php echo form_close();?>
Now, everything works fine, pictures get uploaded in the desired folder and get displayed from it in the way I want it, but every time when I refresh the page the last uploaded picture gets uploaded in addition. I tried in model to clear the memory by entering
Code:
unset($this->input->post('submit'));
and
Code:
unset($this->input->post('userfile'));
but no use.Obviously I don't want that image get upload with every page refresh. I want it happens only the time I click "Upload" button.
What would be the way to accomplish this?

El Forum

[eluser]richthegeek[/eluser]
redirect after upload. simples!