Welcome Guest, Not a member yet? Register   Sign In
Sending user back to referrer
#1

[eluser]Nial[/eluser]
I wanted to ask how people here handle this in CI/PHP: Basically, I have an AJAX powered function on my website. When a user clicks a link, Javascript is executed and an AJAX request is sent off. That's fine. However, in the interest of making my Javascript/AJAX degradable, the link will default to a standard URL when Javascript is not enabled.

The problem I'm having is figuring out how to return the user to the page that they were on before they clicked the link. In a nutshell:

User clicks link -> controller method is called -> database is updated -> return user to the page where they clicked the link.

The obvious solution would be to take the entire url and append it to the link URL, but I'm not sure how I'd parse the URL on the other side, given CI's URL structure.

Any suggestions?


Messages In This Thread
Sending user back to referrer - by El Forum - 08-22-2008, 04:09 AM
Sending user back to referrer - by El Forum - 08-22-2008, 08:50 AM
Sending user back to referrer - by El Forum - 08-22-2008, 09:03 AM
Sending user back to referrer - by El Forum - 08-22-2008, 10:58 AM
Sending user back to referrer - by El Forum - 05-26-2009, 11:20 AM



Theme © iAndrew 2016 - Forum software by © MyBB