On the second page before the html tag write:
<?
session_name(mysession);
session_start();
?>
and then go ahead and echo your $myvar;
> ok, let's have this in the right place
> in a file named startsesion.php i.e.
>
> session_start();
> session_name("mysesion");
> session_register("myvar");
> $myvar = "whatever";
>
> a SID is generated autmaticaly
>
>
> I've been trying to echo the values of the var defined
> and the SID generated in another php file
>
> <?php echo ($sesionvar); ?> not working
> <?php echo ($HTTP_SESSION_VARS["myvar"] ); ?> not working
> <?php echo ($GLOBALS[$sesionvar]); ?> not working
> <?php echo session_name(); ?> not working
>
> <?php echo ($PHPSESSID); ?> not working
>
> how can I get this values?
>
> thanks, gracias
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]