How can we register the variables into a Session?
Answer Posted / animesh dutta
<?php
// Start the session
session_start();
?>
<?php
// Set session variables
$_SESSION["favcolor"] = "green";
$_SESSION["favanimal"] = "cat";
echo "Session variables are set.";
?>
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
What is difference between mysql_connect and mysqli_connect?
Are react hooks stable?
Which function would you use to format date information in php?
How can you pass a variable by reference?
Does php support multithreading?
With a heredoc syntax, do I get variable substitution inside the heredoc contents?
What is substr in php?
How to execute a php script from the command line?
What is trim codeigniter?
What is advanced php programming?
What is difference between mysqli and mysql?
What is var_dump function in php?
Explain Type hinting in PHP?
Explain the difference between isset() and empty()?
Explain about require and include function?