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
When to use get and post request?
What are the differences between session and cookie?
What is cookie and why do we use it?
What is echo in html?
Which is the dependent variable?
How to copy a file?
What is filter_var?
Is php used in 2019?
Is json a string php?
How To Get the Uploaded File Information in the Receiving Script?
When do sessions end?
What does session start do in php?
Are php variables global?
What is list function with their uses.
Why do we use csrf token?