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
Do you know what is the difference between the include() and require() functions?
Write a program to get second highest number in an array using php?
How to create connection in php?
What is the content of /etc directory?
What are the advantages of triggers in php?
Is php better than python?
What is explode() in php?
How to increase the execution time of a PHP script?
What is meant by urlencode and urldecode?
Explain what is the difference between $var and $$var?
What is cookie in php with example?
How to get elements in reverse order of an array in php?
Write a select query that will be displayed the duplicated site name and how many times it is duplicated?
what is mean by portal
What does php mean?