Welcome Guest, Not a member yet? Register   Sign In
controller redirects to same page and creates a page inside a page

(This post was last modified: 03-11-2019, 10:25 AM by viprit.)

I'm having a strange issue. My page is essentially several forms on the same page but when one form is completed and I do everything I need on the backend, I use redirect(base_url('dashboard')) but it creates the same page on top of the page that was already there. So If I scroll down, I can see the same page (although broken because of javascript stuff) Speed Test Scrabble Word Finder Solitaire

Has anyone dealt with this issue? I've never done a single page site before. I appreciate any feedback! let me know if you want to see the code.

Redirecting will return a html page as a response but all you need to do is to validate the form data and do other stuffs as needed, then get a json response from the server instead of redirecting and show/hide forms based on the response you are getting.

Theme © iAndrew 2016 - Forum software by © MyBB