Welcome Guest, Not a member yet? Register   Sign In
[Solved] How to unset($this->input->post('submit'));
#1

[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?
#2

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




Theme © iAndrew 2016 - Forum software by © MyBB