NYCPHP Meetup

NYPHP.org

[nycphp-talk] Disabling browser back button.

PaulCheung paulcheung at tiscali.co.uk
Fri Jul 4 03:35:06 EDT 2008


Hi Tedd,

Thanks for the solution, it is very much appriciated.

Cheers - Paul



----- Original Message ----- 
From: "tedd" <tedd at sperling.com>
To: "NYPHP Talk" <talk at lists.nyphp.org>
Sent: Sunday, June 22, 2008 9:13 PM
Subject: Re: [nycphp-talk] Disabling browser back button.


> >Hi Tedd,
>>Sorry to say it didn't work or at least I couldn't get it to work. As you 
>>see the only thing I did was to tidy up the last $_SESSION['token']. 
>>however I did try using True and False which disabled me completely.
>>
>><?php session_start(); ob_start();
>>    $token = isset($_SESSION['token']) ? $_SESSION['token'] : 0;
>>      if ($token == 1)
>>    {
>>    exit();
>>    }
>>$_SESSION['token'] = 1;
>>?>
>>
>><HTML><HEAD><TITLE>create account/access codes</TITLE></HEAD>
>><BODY>
>>
>>Cheers - Paul
>
>
> Paul:
>
> It does work -- here's a working example:
>
> http://webbytedd.com/bb/one-time/
>
> You can only see it once per session and it uses exactly the code I 
> posted.
>
> You might take out that ob_start() and try it again.
>
> Cheers,
>
> tedd
> -- 
> -------
> http://sperling.com  http://ancientstones.com  http://earthstones.com
> _______________________________________________
> New York PHP Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> NYPHPCon 2006 Presentations Online
> http://www.nyphpcon.com
>
> Show Your Participation in New York PHP
> http://www.nyphp.org/show_participation.php 




More information about the talk mailing list