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 design
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
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, it
No real reason to start the session in index.php. You are not registering
any session vars, nor are you accessing any.
index.php
?php
session_start();
?
form name=form1 method=post action=admin_select.php
table border=0 cellspacing=0 cellpadding=0
tr bgcolor=#CFCFCF
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
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
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
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
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
9 matches
Mail list logo