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
What is sticky form in php?
What is a persistent cookie in php?
Tell me what are the functions to be used to get the image's properties (size, width and height)?
What is the best way to avoid email sent through php getting into the spam folder?
What is associative array in php?
What is the use of die in php?
What is memcache?
What is basic php?
How do I repair phpmyadmin?
What is difference between mysql_connect and mysqli_connect?
How to know user has read the email-php?
How to get ip address of a server in php?
What is http get and post?
How to convert a string to uppercase in php?
Is php a low level language?