Welcome Guest, Not a member yet? Register   Sign In
Page Refresh poblem
#5

[eluser]boltsabre[/eluser]
Yeah, using "this->load->view" only loads on new view on top of your controller (for want of a better expression)...

Your controller has these lines of code:
Code:
$e_uname = $this->input->post('e_uname');
   $e_fname = $this->input->post('e_fname');...

When the user has been redirected to the home page via "this->load->view" and then does a refresh, there is no form, no $_POST, so
Code:
$e_uname = $this->input->post('e_uname');
print_r($e_uname); // will print 0 or false or null or something)
because $this->input->post('e_uname'); does not exist.

The rest of your code was also running after the refresh
$this->load->model('dbmodel');
$this->dbmodel->update_entry($data,$sid);

And inserting a big bunch of...NOTHING into your DB!!!

After successful form submission ALWAYS use redirect to get to a new "clean" controller/view


Messages In This Thread
Page Refresh poblem - by El Forum - 09-07-2012, 04:32 AM
Page Refresh poblem - by El Forum - 09-07-2012, 05:56 AM
Page Refresh poblem - by El Forum - 09-07-2012, 06:02 AM
Page Refresh poblem - by El Forum - 09-07-2012, 06:44 AM
Page Refresh poblem - by El Forum - 09-07-2012, 06:52 AM
Page Refresh poblem - by El Forum - 09-07-2012, 07:01 AM
Page Refresh poblem - by El Forum - 09-07-2012, 07:25 AM



Theme © iAndrew 2016 - Forum software by © MyBB