How can we register the variables into a Session?
Answer Posted / ramesh n
If you want to register a username as a session variable
means, There are 3 ways done in a job
First way
session_start();
$username=$_GET['username'];
session_register('username');
Second Way
session_start();
$username=$_GET['username'];
$HTTP_SESSION_VARS['username']=$username;
Third Way
session_start();
$username=$_GET['username'];
$_SESSION['username']=$username;
| Is This Answer Correct ? | 53 Yes | 5 No |
Post New Answer View All Answers
Is null check in php?
What is laravel php?
What is the default time of cookie in php?
What are default session time and path?
Explain me what is x+ mode in fopen() used for?
How many columns can be added in a table in mysql?
What is array and function?
What's the difference between __sleep and __wakeup?
What are variables in research examples?
How to stop the execution of php script?
What is data structure in php?
Which is the best web server?
What is rtrim php?
Explain how can we increase the execution time of a php script?
What is php trait?