Re: $_SESSION unset for other user
- From: "Kimmo Laine" <spam@xxxxxxxxxxxxx>
- Date: Wed, 3 Jan 2007 14:18:51 +0200
"avlee" <xx@xxxxx> wrote in message news:op.tlkugdal1sq83a@xxxxxxxxx
Hello
I have application in php where users login and logout.
I wanted to create function for administrator which will
delete all session's data for other users.
For example, each user session data is written in:
$_SESSION['$username']['data']
Single quotes and variables don't mix. Use $_SESSION[$username] or
$_SESSION["$username"], but not $_SESSION['$username']. '$username' means
literally a string $username, the variable is not replaced in the string
like it does when "$username" is used... Try this:
$foo = bar;
echo '$foo'; // prints: $foo
echo "$foo"; // prints: bar
echo $foo; // prints: bar
--
"Ohjelmoija on organismi joka muuttaa kofeiinia koodiksi" - lpk
http://outolempi.net/ahdistus/ - Satunnaisesti päivittyvä nettisarjis
spam@xxxxxxxxxxxxx | rot13(xvzzb@xxxxxxxxxxxxx)
.
- References:
- $_SESSION unset for other user
- From: avlee
- $_SESSION unset for other user
- Prev by Date: $_SESSION unset for other user
- Next by Date: Re: $_SESSION unset for other user
- Previous by thread: $_SESSION unset for other user
- Next by thread: Re: $_SESSION unset for other user
- Index(es):