session variable
Posted: Thu Jul 09, 2009 3:52 am
i tried creating a session variable.
Wht r necessary steps to do..
i tried with the following..
session_start();
session_register ("my_username");
$my_username = $credentials['username'];
//here $credentials['username'] will display the actual username
Now i want to use ths username in other file.
so i tried
session_start();
session_register ("my_username");
echo"hello";
echo $_SESSION['my_username'];
i also tried $my_usename;
nothing is wrking
the variable is null and not displaying anuthg.
Pls helpppp...
Wht r necessary steps to do..
i tried with the following..
session_start();
session_register ("my_username");
$my_username = $credentials['username'];
//here $credentials['username'] will display the actual username
Now i want to use ths username in other file.
so i tried
session_start();
session_register ("my_username");
echo"hello";
echo $_SESSION['my_username'];
i also tried $my_usename;
nothing is wrking
the variable is null and not displaying anuthg.
Pls helpppp...