Your'e right, that's a typo.
If I put a
echo $_SESSION['counter_file'] .
' testx ' . $counterFile;
Before and after the conditional, $_SESSION['counter_file'] is set after the conditional, as it should be. But, it is gone from the before echo when the function is recalled.
The Sessi
[snip]
session_start();
if($_SESSION['counter_file'] !==$counterFile)//See if
visitor has already been counted for this page
{$num += 1;
$_SESSION['counter_file'] = $counterFile;
}
echo $_SESSION['counterFile'] . '
So does your code work? Here's a tip: Try a simple example, like what's in
the manual, and see which method works for you. If they both work, which one
do you understand? Use that one...
---John Holmes...
- Original Message -
From: "Pushpinder Singh Garcha" <[EMAIL PROTECTED]>
To: <[EMAI
On Tue, 12 Mar 2002, Gonzalez, Zara E wrote:
> On second look, perhaps it is working correctly.
>
> I wasn't incrementing my counter variable. Sorry to flood your mailboxes.
>
> Zara
>
this should work as well;
foreach($_REQUEST as $key => $val) {
$_SESSION[$key] = $val;
}
--
Jan R
ion_register and session_unregister. So that wouldn't work for me anyway.
(http://www.php.net/manual/en/function.session-register.php)
Zara
-Original Message-----
From: Coggeshall, John [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 12, 2002 3:38 PM
To: Gonzalez, Zara E
Subject: RE: [P
wouldn't work for me anyway.
(http://www.php.net/manual/en/function.session-register.php)
Zara
-Original Message-
From: Coggeshall, John [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 12, 2002 3:38 PM
To: Gonzalez, Zara E
Subject: RE: [PHP] Another Session Question..
If you are tr
6 matches
Mail list logo