Welcome Guest, Not a member yet? Register   Sign In
How to avoid $_POST resending data?
#4

[eluser]Michael Wales[/eluser]
Eliminating refresh reposting is very easy in CodeIgniter:

Code:
if ($this->validation->run()) {
  // Our code validatates
  // Add to database
  redirect('somewhere');
  return;
}

$this->load->view('my_form');

Since you are redirecting after the submission of data, it's impossible for the refresh to resubmit.


Messages In This Thread
How to avoid $_POST resending data? - by El Forum - 10-09-2008, 09:43 PM
How to avoid $_POST resending data? - by El Forum - 10-10-2008, 07:10 AM
How to avoid $_POST resending data? - by El Forum - 10-13-2008, 10:53 PM
How to avoid $_POST resending data? - by El Forum - 10-13-2008, 11:20 PM
How to avoid $_POST resending data? - by El Forum - 10-13-2008, 11:43 PM



Theme © iAndrew 2016 - Forum software by © MyBB