Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_php thread: Session_register & $_SESSION (was: SV: RE: Session Variable Echo Question)


Message #1 by "Datatal AB - Gauffin, Jonas" <jonas@d...> on Mon, 23 Dec 2002 08:07:29 +0100
One thing here.
Session_register should not be used with $_SESSION vars. 
Session_register is used to get a $var from a session variable.

> -----Ursprungligt meddelande-----
> Fr=E5n: Mark Carruth [mailto:mcarruth@t...]
> Skickat: den 22 december 2002 11:42
> Till: professional php
> =C4mne: [pro_php] RE: Session Variable Echo Question
>
>
> page1.php:
>
> <?php
>
> session_start();
>
> $something =3D "Hi There";
>
> session_register("something");
>
> ?>
>
> page2.php:
>
> <?php
>
> session_start();
>
> echo("The value of the 'something' variable is:" .
> $_SESSION['something']);
>
> ?>
>
> I haven't used sessions much so that might not work, though I hope it
> helps somewhat.
>
> Mark Carruth
>
> -----Original Message-----
> From: Jim Hankins [mailto:jhankins@o...]
> Sent: 22 December 2002 05:42
> To: professional php
> Subject: [pro_php] Session Variable Echo Question
>
>
> I'm trying to echo to a screen the contents of a http_session_variable
> and am having some problems.  First I tried to just use the
> variable in
> an echo statement, then I tried to just assign the contents of that
> variable to another variable.  If someone could give me an
> example of an
> Echo "Example Text including the http_session_variable";  I would
> appreciate it.  I seem to be confounded on this one.  Thanks
> in advance!
>
>
>
>
>
>
>
>

  Return to Index