On 4 Apr 2004 Andy B wrote:
> how would you empty all the contents of $HTTP_SESSION_VARS when you
> dont need them anymore but still keep the current session running?
See http://www.php.net/manual/en/function.session-unset.php. That is
exactly what it does. That page also explains why unset()
CTED]
Sent: Sunday, April 04, 2004 6:03 PM
To: [EMAIL PROTECTED]
Subject: [PHP] $HTTP_SESSION_VARS still holds original values even after
unset?
how would you empty all the contents of $HTTP_SESSION_VARS when you dont
need them anymore but still keep the current session running? the problem
seems
"$HTTP_SESSION_VARS = array();"
doesnt work... it kills the session and forces me to login as soon as the
array is empty
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Andy B wrote:
how would you empty all the contents of
> $HTTP_SESSION_VARS when you dont need
> them anymore but still keep the current
> session running?
$HTTP_SESSION_VARS = array();
---John Holmes...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/u
how would you empty all the contents of $HTTP_SESSION_VARS when you dont need them
anymore but still keep the current session running? the problem seems to be that when
i try to fill them with something else (dont need the original values anymore) but
need new ones without destroying the session
Aaah! That clears something up. Thanks.
"Ernest E Vogelsinger" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> At 22:17 13.03.2003, rotsky said:
> [snip]
> >I thought session vars were either POSTed or passed via cookies...
> --
At 22:17 13.03.2003, rotsky said:
[snip]
>I thought session vars were either POSTed or passed via cookies...
[snip]
No - you're mixing up the session identifier and session data.
The session identifier is just an arb
I thought session vars were either POSTed or passed via cookies...
"Cpt John W. Holmes" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> > do the session vars get treated with magic quotes? The last comment at
the
> bottom of:
> >
> > http://www.php.net/manual/en/function.get-magic-qu
> do the session vars get treated with magic quotes? The last comment at the
bottom of:
>
> http://www.php.net/manual/en/function.get-magic-quotes-gpc.php
>
> Seems to think so. He's written good code, but I have my doubts as to
whether it should be applied
> to session vars.
The "gpc" stands for
do the session vars get treated with magic quotes? The last comment at the bottom of:
http://www.php.net/manual/en/function.get-magic-quotes-gpc.php
Seems to think so. He's written good code, but I have my doubts as to whether it
should be applied
to session vars.
--
PHP General Ma
On Tue, Aug 13, 2002 at 10:07:57AM -0700, Rasmus Lerdorf wrote:
> > while ( list($Key, $Val) = each($_SESSION) ) {
> > $$Key = $Val;
> > }
>
> extract($_SESSION) is a better way to do that.
Yeah. Old habits die hard! :)
--Dan
--
PHP classes that make web desi
> while ( list($Key, $Val) = each($_SESSION) ) {
> $$Key = $Val;
> }
extract($_SESSION) is a better way to do that.
-Rasmus
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
No real reason to start the session in index.php. You are not registering
any session vars, nor are you accessing any.
> index.php
>session_start();
> ?>
>
>
>
>
> Admin Login
>
>
>
> Username:
>
>
>
>
>
> Passwor
Petre:
On Tue, Aug 13, 2002 at 03:18:42PM +0200, Petre Agenbag wrote:
>
> I have register_golbals = on, BUT, I want to find a way to code that I
> know will always work, regardless of register_globals or cookies, so
> that I am only dependant on the trans-sid ( but If I could rule that out
> too,
Rasmus
OK, I think I understand the principle now, yet, when I implement id, my
app still fails.
I have register_golbals = on, BUT, I want to find a way to code that I
know will always work, regardless of register_globals or cookies, so
that I am only dependant on the trans-sid ( but If I could ru
No, you don't need to use HTTP_SESSION_VARS for anything if
register_globals is on. Sessions are very simple. You start a session,
and you register variables to be part of that session. Like this:
session_start();
session_register('a');
session_register('b');
If you have that at the top of
Oh, almost forgot,
I *think* the reason why I'm still worrying about the $HTTP_* arrays are
because I *think* that it is the correct way to work with the vars once
register_globals is turned off ( which is where things are moving to
right?), and I don't want to re-code my scripts...
Am I making s
You lost me there...
Are you saying I don't need to access those variable in that way?
Can I simply use $variable in successive pages then?
Surely I MUST use that notation to assign values then right?, specially
to the session vars, right?
But, just out of curiosity, why does it work fine on my n
If register_globals is known to be on, why are you worrying about
the $HTTP_* arrays?
On 12 Aug 2002, Petre Agenbag wrote:
> Hi
> Me again
>
> Still having problems with forms not sending variables, and session
> variables dissapearing.
>
> I have 2 systems, one older 4.0.3 PHP which is my main
Hi
Me again
Still having problems with forms not sending variables, and session
variables dissapearing.
I have 2 systems, one older 4.0.3 PHP which is my main webserver, so all
scripts must comply with it...
And the other my development server with the latest 4.1.2
So, I'm trying to write scrip
If you're going to use $HTTP_SESSION_VARS, then you have to use
session_register().
Next page:
That should work. If you use $_SESSION, instead, then you don't have to use
session_register.
That's how I understand it...
---John Holmes...
>>> "Henry" <[EMAIL PROTECTED]> 07/17/02 10:14AM >>>
Ignore that, I'll just go grab my copy of Hooked on Phonics so I can learn to read
before replying.
:trots off:
Martin Clifford
Homepage: http://www.completesource.net
Developer's Forums: http://www.completesource.net/forums/
>>> "Martin Clifford" <[EMAIL PROTECTED]> 07/17/02 10:15AM >>>
Defi
Define the value of $count before registering it, and it should work fine :o)
Martin Clifford
Homepage: http://www.completesource.net
Developer's Forums: http://www.completesource.net/forums/
>>> "Henry" <[EMAIL PROTECTED]> 07/17/02 10:14AM >>>
The answer is probably yes.
I do a
"session_start
The answer is probably yes.
I do a
"session_start()" followed by a "$HTTP_SESSION_VARS['count']=2" on one page.
Then I go to another page and do a "session_start()" again; unfortunately
the $HTTP_SESSION_VARS['count'] is empty!!!
I tried doing a "session_register('count2'); $count2=123;" in the
: <[EMAIL PROTECTED]>
Sent: Thursday, March 14, 2002 4:54 PM
Subject: [PHP] $HTTP_SESSION_VARS with unset()
> when someone logs in, it sets $HTTP_SESSION_VARS with the appropriate
> information. to log them out, I tried just using
> unset($HTTP_SESSION_VARS['valid_user']) b
when someone logs in, it sets $HTTP_SESSION_VARS with the appropriate
information. to log them out, I tried just using
unset($HTTP_SESSION_VARS['valid_user']) but it doesn't actually remove
it from the session. it will only work if valid_user was set on the same
script call (for example, if it log
Hello,
Slight Problem:
--
This piece of code:
session_start();
unset($testvar);
session_register("testvar"); $HTTP_SESSION_VARS["testvar"] = "testval";
print "Global: $testvar | Track_var: " . $HTTP_SESSION_VARS["testvar"] . ".";
$testvar = "testglobalassign";
print "Global: $testvar |
> Regarding the same topic of session management, I am using
> PHP 3.09 and when
> I call session_start() or $HTTP_SESSION_VARS['someVariable]
> I get :
>
> Fatal error: Call to unsupported or undefined function session_start()
>
>
> So, my question is that: Is there any session management in
f the
answer is no, what weould be an alternative?
Regards,
Ozgur
- Original Message -
From: "Chris O'Brien" <[EMAIL PROTECTED]>
To: "Ron Clark" <[EMAIL PROTECTED]>
Cc: "PHP general list" <[EMAIL PROTECTED]>
Sent: Friday, November 09,
> SORRY i just coppied it wrong
> the actual code is capitalized
>
> while(list($k, $v) = each($HTTP_SESSION_VARS))
In that case, $HTTP_SESSION_VARS is not an array because you have no session
variables yet...
session_start();
session_register('foo');
$foo = 42;
while (list($k, $v) = each($HTTP_
if there aren't any session vars, $HTTP_SESSION_VARS won't be an array.
i use something like
if(isset($HTTP_SESSION_VARS)) {
reset($HTTP_SESSION_VARS);
while(list($k, $v) = each($HTTP_SESSION_VARS)) {
do_something($k,$v);
}
}
on 8/1/01 11:46 AM, Jon Yaggie at [EMAIL PROTECTED] wrote
> while (list ($key, $val) = each ($HTTP_session_VARS)) {
> echo "$key => $val";
> }
>
> i get the error -
>
> Warning: Variable passed to each() is not an array or object
> in /var/www/html/adult/func.php on line 5
Change "HTTP_session_VARS" to "HTTP_SESSION_VARS", since variable names ar
SORRY i just coppied it wrong
the actual code is capitalized
while(list($k, $v) = each($HTTP_SESSION_VARS))
- Original Message -
From: "Faisal Nasim" <[EMAIL PROTECTED]>
To: "Jon Yaggie" <[EMAIL PROTECTED]>
Sent: Thursday, August 02, 2001 12:23 AM
Subj
when i try this then .. . .
while (list ($key, $val) = each ($HTTP_session_VARS)) {
echo "$key => $val";
}
i get the error -
Warning: Variable passed to each() is not an array or object in
/var/www/html/adult/func.php on line 5
and well it looks liek an array to me . . is there soemth
34 matches
Mail list logo