Need Refresh in Code Igniter |
[eluser]developer_rtpl[/eluser]
I am facing refresh problem in code igniter, for eg:- When I edit a value in a record in CI n then I need to refresh that page to see the changes..Without refresh it shows the old value of that record. I am also facing the same problem when I submit a form or delete any record.Please suggest some solution for that.
[eluser]Thorpe Obazee[/eluser]
Code: redirect('the_last_uri_segments'); For example, you are here: http://localhost/page/edit/1 and then save to the same url, you just redirect to redirect('page/edit/1') or redirect(current_url()); Another sample with the same principle: Code: if ($this->form_validation->run('calendar_add') === TRUE)
[eluser]Cro_Crx[/eluser]
bargainph: I think he's talking about losing form data when posting or refreshing, I could be wrong though. Ranosys: Can you post a snippet of your code so we can have a look at what you're trying to do?
[eluser]Thorpe Obazee[/eluser]
[quote author="Cro_Crx" date="1242641858"]bargainph: I think he's talking about losing form data when posting or refreshing, I could be wrong though. Ranosys: Can you post a snippet of your code so we can have a look at what you're trying to do?[/quote] Err... is he? He says, he sees the changes but only when he refreshes the page, which means he actually is updating the data.
[eluser]Cro_Crx[/eluser]
Sorry my bad, you are correct i just read it again I knew i wrote "I think" for a reason. LOL
[eluser]Thorpe Obazee[/eluser]
That's very normal. I don't usually 'read' a whole post sometimes and read a whole post and still miss something (a lot of things).. |
Welcome Guest, Not a member yet? Register Sign In |