Results 1 to 9 of 9

Thread: logout

  1. #1
    Join Date
    Apr 2007
    Location
    kuantan
    Posts
    21
    Rep Power
    0

    logout

    hai sume,sy nk mintak tolong 4 logout code..ada sape2 yang tau x?please give example..

  2. #2
    Join Date
    Sep 2005
    Location
    in my body lar...
    Posts
    1,325
    Rep Power
    0
    langsung tak faham apa u nak buat ni ... bleh terangkan secara teliti....
    boleh pakai english atau bm yang takda shorcut ka...

  3. #3
    Join Date
    Apr 2007
    Location
    kuantan
    Posts
    21
    Rep Power
    0
    Quote Originally Posted by iamfreelancer View Post
    langsung tak faham apa u nak buat ni ... bleh terangkan secara teliti....
    boleh pakai english atau bm yang takda shorcut ka...

    boleh tak beri saya contoh coding untuk logout?

  4. #4
    Join Date
    Sep 2005
    Location
    in my body lar...
    Posts
    1,325
    Rep Power
    0
    just release all the session variable will do lar....

    php function: session_destroy();

    asp code: Session.Abandon

  5. #5
    Join Date
    Apr 2007
    Location
    kuantan
    Posts
    21
    Rep Power
    0
    Quote Originally Posted by iamfreelancer View Post
    just release all the session variable will do lar....

    php function: session_destroy();

    asp code: Session.Abandon
    dah cuba yang you suruh buat tu..tapi bila tekan button back sistem tu tetap boleh masuk semula

    ni aturcaranya

    <?php
    //include("odbc.php");
    //session vars reg.
    //session_register("session");
    session_start();
    session_destroy();
    session_unregister("user_id");

    ?>
    <html>
    <head>
    <meta http-equiv="Refresh" content="0;URL=index.php">
    <title>Log Out</title>
    </head>

    apa yang boleh saya ubah atau tambah dalam aturcara tersebut

  6. #6
    Join Date
    Aug 2006
    Location
    Malaysia
    Posts
    1,576
    Rep Power
    188
    Quote Originally Posted by beih107 View Post
    dah cuba yang you suruh buat tu..tapi bila tekan button back sistem tu tetap boleh masuk semula
    apa yang boleh saya ubah atau tambah dalam aturcara tersebut
    Do you mean the browser back button?
    This is normal - 'cache', but if the page is refreshed or any links are clicked on that page. It should redirect to the login page, if the page does the checking on the login part, e.g checking the session.

    For example, in the famous Friendster, when click log out, and then click the browser back button, the page 'seems' as of the one logged in, but if you click any links on it or refresh button, it will redirect to the login page.

  7. #7
    Join Date
    Sep 2005
    Location
    in my body lar...
    Posts
    1,325
    Rep Power
    0
    Quote Originally Posted by beih107 View Post
    dah cuba yang you suruh buat tu..tapi bila tekan button back sistem tu tetap boleh masuk semula


    apa yang boleh saya ubah atau tambah dalam aturcara tersebut
    as wat genzy say... it cached by your browser and when you hit back button, your browser are actually retrieving the previous page from your computer cache instead of reload it from your web server...

    to prevent this, you can add some code in the header of each page to tell the browser not to cache the page....

    you can view some sample code below:

    <?
    Header('Cache-Control: no-cache');
    Header('Pragma: no-cache');
    ?>

    for more details on php header visit ---> PHP: header - Manual

  8. #8
    Join Date
    Apr 2007
    Location
    kuantan
    Posts
    21
    Rep Power
    0

    Talking

    tq banyak2 kepada sume..i dah success pasal logout

  9. #9
    Join Date
    Jun 2001
    Location
    Mystic Kingdoms
    Posts
    2,749
    Rep Power
    275
    saya berasa terharu dengan kesungguhan anda

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. logout in ASP
    By wackyflik in forum Website Programming
    Replies: 2
    Last Post: 21-10-2004, 08:37 AM
  2. log in / logout
    By nuha in forum Website Programming
    Replies: 2
    Last Post: 02-05-2002, 11:35 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Search Engine Optimization by vBSEO 3.5.0 RC1 PL1

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39