Login redirect to last page

Discussion in 'Installation' started by chrisgeo, Jun 20, 2012.

  1. chrisgeo

    chrisgeo New Member

    Joined:
    Apr 5, 2012
    Messages:
    10
    Hi. I had my website set up to redirect users to the last page but I made some updates and lost the code. I remember there were 2 pieces of code, one that handles the redirect and one that creates a session cookie.

    I placed this code in a php file and set AMEMBER to redirect to this php file which then redirects the user to the last page they were on. Problem is, I lost the cookie code. Can someone help?

    Thank you

    This is the code I have:

    <?php
    session_start();
    if(isset($_SESSION['url']))
    $url = $_SESSION['url'];
    else
    $url = "amember/member"; // default page for

    header("Location: http://mysite.com/$url");

Share This Page