How can we register the variables into a Session?

Answer Posted / senthilkumar g

<?

session_start();
$username=$_GET['username'];
$_SESSION['username']=$username;
session_write_close();
?>

Is This Answer Correct ?    13 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are differences between PECL and PEAR?

520


What is php and why it is used?

555


Where are the persistent cookies stored on your computer?

583


Why is facebook still using php?

583


How to call a php function from another php file?

510






What is the importance of "method" attribute in a html form?

560


What is the difference between for and foreach in php?

502


Do I need apache for php?

626


What is super () python?

545


How to display your correct URL of the current web page?

650


How to delete file in php?

532


Why and where do we use htaccess?

538


Which is better php praogramming or cad/cam scope wise and also salaray wise?

1584


Explain me is multiple inheritance supported in php?

537


Write a program in php to check whether a number is prime or not?

506