Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_php thread: SV: Re: Global variable in a page


Message #1 by "Datatal AB - Gauffin, Jonas" <jonas@d...> on Sun, 16 Feb 2003 09:24:22 +0100
Session_register should only be used if you would like to use the 
session variabel as a "normal" one.

Use either
$_SESSION['reload'] =3D 1;

Or:
Session_register('reload');
$reload =3D 1;


Don't forget session_start() or sessions wont work at all.

> -----Ursprungligt meddelande-----
> Fr=E5n: esanchez@g... [mailto:esanchez@g...]
> Skickat: den 15 februari 2003 17:01
> Till: professional php
> =C4mne: [pro_php] Re: Global variable in a page
>
>
> Try using session vars....
> something like:
> <?
>   if isset($_SESSION['reload'])
>     $_SESSION['reload']=3D$_SESSION['reload'] + 1;
>   else
>   {
>     session_register('reload');
>     $_SESSION['reload']=3D0;
>   }
> ?>
> didn't test this, but something like that should work for
> what you want...
> I recomment you to read about php session vars on the php manual...
> regards,
>   -eduardo s.m.
>
>

  Return to Index