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 is meant by pear in php? What is the purpose of it?

517


Explain array_uintersect()?

579


What is the function to count elements in an array in PHP?

618


How to remove white spaces from the beginning and/or the end of a string in php?

533


How to know user has read the email-php?

487






Whether php supports microsoft sql server?

549


What is in php 7?

549


List some sorting functions in php?

541


Will react hooks replace redux?

505


Where is session value stored php?

526


What is mysqli php?

519


Can php run without server?

552


What is T_PAAMAYIM_NEKUDOTAYIM?

665


What is a helper function?

533


write a prog using insert,update,delete in this manner as output? name: phno. add button 1.name phno. edit button delete button 2.

1546