There is a little code that worked before my virtual host before they
updated to 4.3.1.
First time the function is called session should be set, subsequent
calls should be skipped.
session_start();
if($_SESSION['counter_file'] !==$counterFile)//See if
[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'] .
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
Hello all,
I have php ver 4.1.1 running with register_globals() ON on my site. I
am trying to use sessions to maintain state during a visit to the site.
I have read thru the manual, but my mind is still cluttered with
doubts. I understand that use of the $_SESSION global array will
greatly
PROTECTED]
Sent: Monday, June 09, 2003 4:23 PM
Subject: [PHP] Another Session Question
Hello all,
I have php ver 4.1.1 running with register_globals() ON on my site. I
am trying to use sessions to maintain state during a visit to the site.
I have read thru the manual, but my mind is still
I've seen various tutorials on sessions where they specify the session id
instead of just using one
generated by php !
Why ?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I asked a question the other day about turning $_REQUEST variables into
$_SESSION variables...thanks, all who helped me with that...
I have another question about assigning $_REQUEST variables to $_SESSION
variables that I am hoping someone can help me out with
Here is a snippit of code...
-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 trying to register any variable... Say $foo...
Session_register('foo');
It will automatically appear
-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 trying to register any variable... Say $foo...
Session_register('foo
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
10 matches
Mail list logo