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

Do I need to install php after xampp?

518


Difference between mysql_connect and mysql_pconnect?

499


Explain what is the static variable in function useful for?

515


What does csrf token mismatch mean?

600


What is faster in php?

570






What is the phpstorm?

518


How can we destroy the cookie in php?

521


What is alias in php?

543


Can you pass an array into a function?

551


How do sessions work in php?

495


What is difference between post and put in rest?

505


What is the difference between pop3 IMAP and MAPI?

628


How can we get the error when there is a problem to upload a file?

515


What is instantiation?

1736


What is api example?

512