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
How to get no of arguments passed to a PHP Function?
what is the scope of php in the future if any other language is developed then may be php is loss ???
How can I convert ereg expressions to preg in php?
Is php still used?
Is python easier than php?
Which escape sequences can be used in single quoted strings in php?
Tell me how to create a text file in php?
What is php's mysqli extension?
my english is not too good then what we apply for a php programer post
How to remove blank spaces from the string?
can you give me an example code of calling java script function in php variable using AJAX.or with out ajax??????
Explain some most commonly use string functions in php?
What is namespace in php?
How could I install codeignitor ?
How to compare two strings with comparison operators in php?