Skip to content
Advertisement

Reload current URL in Codeigniter After Submit The Form

I have one form in my view.php file. Its URL like https://example.com/members/view/1, https://example.com/members/view/2 etc. When I submit form its calling model through controller like below

JavaScript

and model is like below

JavaScript

Currently its working fine and on form submit its loding view called add_comments, instead I want reload/refresh current page. I am not able to get idea of how I can do it, let me know if someone can help me for do it.

Thanks!

Advertisement

Answer

According to this answer, in the controller you can use:

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement