Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Is null check in php?

992


What is laravel php?

1016


What is the default time of cookie in php?

985


What are default session time and path?

1117


Explain me what is x+ mode in fopen() used for?

1008


How many columns can be added in a table in mysql?

993


What is array and function?

1047


What's the difference between __sleep and __wakeup?

1056


What are variables in research examples?

1070


How to stop the execution of php script?

969


What is data structure in php?

1004


Which is the best web server?

965


What is rtrim php?

1014


Explain how can we increase the execution time of a php script?

992


What is php trait?

964