I want the page to go back to my login page.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • rich

    I want the page to go back to my login page.

    I want to logoff my application and I have set up a link to do this. I
    got it to destroy my session, but I can't get the page to go to the top
    of the browser and do a page refresh. Here is the code I am using.

    First there is the link I am using.

    printf("<a href=\"%s?logof f=%s\">%s</a><br>\n",
    $_SERVER['PHP_SELF'],"logoff", "LOGOFF");

    Here is piece I use right at the top of the script to destroy the
    session and try to refresh the page.

    if (isset($_REQUES T['logoff'])){
    session_destroy ();
    $_SERVER['PHP_SELF'];
    }

    What do I have to do to get the refresh to work?

  • Rik

    #2
    Re: I want the page to go back to my login page.

    rich wrote:[color=blue]
    > I want to logoff my application and I have set up a link to do this. I
    > got it to destroy my session, but I can't get the page to go to the
    > top of the browser and do a page refresh. Here is the code I am using.
    >
    > First there is the link I am using.
    >
    > printf("<a href=\"%s?logof f=%s\">%s</a><br>\n",
    > $_SERVER['PHP_SELF'],"logoff", "LOGOFF");
    >
    > Here is piece I use right at the top of the script to destroy the
    > session and try to refresh the page.
    >
    > if (isset($_REQUES T['logoff'])){
    > session_destroy ();
    > $_SERVER['PHP_SELF'];
    > }
    >
    > What do I have to do to get the refresh to work?[/color]

    A bit blunt:
    if (isset($_REQUES T['logoff'])){
    session_destroy ();
    header("Locatio n: http://somewhere.dk");
    }

    Grtz,
    --
    Rik Wasmus


    Comment

    • rich

      #3
      Re: I want the page to go back to my login page.

      Again Rick you are on the money.

      Comment

      Working...