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()
Something else in your code is messing you up if you cannot change the value
after setting it in the first place. This happens all the time in my code
as my client makes decisions along the way. Try a small test creating a
session variable, displaying it, changing it, and redisplaying it. If it
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
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
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
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
I must ask first, why don't you just use the session_destroy() function?
it will kill all related sessions variables and reset the PHPSESSID (if
that's you have it named)
Jim Lucas
www.bend.com
- Original Message -
From: "SpamSucks86" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Th
> 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
26 matches
Mail list logo