Posted by Kimmo Laine on 01/03/07 12:18
"avlee" <xx@wp.pl> wrote in message news:op.tlkugdal1sq83a@saturn...
> 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@outolempi.net | rot13(xvzzb@bhgbyrzcv.arg)
Navigation:
[Reply to this message]
|