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 PECL?
What is helper library?
What is session in php w3schools?
Is it possible multiple inheritance in php?
What is get method in java?
What is sql injection in php?
Differentiate between php5 and php7?
How to open standard output as a file handle?
How to compare two strings with comparison operators in php?
What is difference between strstr() and stristr()?
What does the unset() function means?
Why namespace is used in php?
How are cookies created?
Can php run on windows server?
What is the use of hooks?