Re: URGENT: session information
| From: | Burhan Khalid | Date: | Wed, 09 Apr 2003 18:49:05 +0000 |
| Subject: | Re: URGENT: session information | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-143149@lists.php.net to get a copy of this message | ||
On Wed, 2003-04-09 at 12:59, António Rafael Paiva wrote:
> My code is (very simple since is just a first test):
>
> --------------------
> <?php
> session_start();
> session_register("user","count");
>
> if (!isset($user)) {
> $user = "guest";
> $count = 1;
> }
> $count++;
> ?>
I think the problem is you can't register a variable that you haven't
created before hand (that's why its giving you that warning).
A few suggestions :
1. Put the session_register() statement after your if.
2. Use $_SESSION[] in place of session_register()
Please trim your posts.
--
Burhan Khalid
phplist[at]meidomus[dot]com
Please add a reply-to: header
in your messages that points
to the mailing list address
so that all mail is properly
archived and viewed.