NYCPHP Meetup

NYPHP.org

[nycphp-talk] Disabling browser back button.

tedd tedd at sperling.com
Sun Jun 22 11:26:59 EDT 2008


At 9:07 PM +0100 6/21/08, PaulCheung wrote:
>Hi
>
>Can anybody suggest a way around this problem or point me in the 
>right direction?

Use a token.

<?php session_start();

$token = isset($_SESSION['token']) ? $_SESSION['token'] : 0;

if ($token == 1)
    {
    exit();
    }

$_SESSION['token']) == 1;

That way the page will be loaded just once per session.

Cheers,

tedd
-- 
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com



More information about the talk mailing list