Re: RE: Sessions - Bug?
| From: | Andy Hoffman | Date: | Mon, 28 Aug 2000 14:01:53 +0000 |
| Subject: | Re: RE: Sessions - Bug? | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-2218@lists.php.net to get a copy of this message | ||
James Duncan wrote:
> Completed more testing and found weird behaviour. I'm very new to all of
> this so I'm probably the one in the wrong but surely the following is a bug?
>
> <?php
> session_start();
> session_register(MyVariable);
> $MyVariable = 1;
> echo "Variable is: $MyVariable<br>\n";
> ?>
>
> Everything occurs as expected. "Variable is: 1" is displayed onscreen and
> the session file contains: MyVariable|i:1;
>
> Next run this as a separate PHP script.
> .....
James,
As Klaus stated in an earlier message "session_register("MyVariable");
//allways with "" and without $". Could this be part of the problem? Try
putting the double quotes around your variable name in the call to
session_register. Does that do anything different?
--
Andy Hoffman
Web Developer
Bristol-Myers Squibb
email: andy.hoffman@bms.com