Welcome Guest, Not a member yet? Register   Sign In
unwanted repeated upload
#1

[eluser]no-cost lab[/eluser]
Hi Guys,
users of my application can upload files,
but when going back the upload happens again.

Any idea how to prevent this?

Thanks in advance!

No-Cost
#2

[eluser]frist44[/eluser]
Post some code. You'll get a better response that way.
#3

[eluser]no-cost lab[/eluser]
thanks for the advice, code is below.
the problem:
whenever a user removes a file and clicks the "back" button,
another file is being deleted.

this is the form used to remove files:

Code:
<form name="remove_proj_form" method="post" action="<?= site_url("site_name/remove_proj")?>">
    <input type="hidden" name="selected_proj"/>
  </form>
  <form name="remove_img_form" method="post" action="<?= site_url("site_name/remove_img")?>">
    <input type="hidden" name="selected_img" />  
    <input type="hidden" name="selected_proj"/>
  </form>


this is the link that is removing a file:

Code:
<a href="[removed]remove_img(&lt;?=$i?&gt;,&lt;?=$project['project_id']?&gt;)" style="text-decoration:none">

this is the javascript called by the link above:
Code:
function remove_proj(proj)
{
  if (!confirm("Are you sure you want to remove this project?"))
    return;
  document.remove_proj_form.selected_proj.value = proj ;
  document.remove_proj_form.submit() ;
}

thanks again!

No Cost




Theme © iAndrew 2016 - Forum software by © MyBB