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
Why shouldn't I use mysql_* functions in php?
What is local variable in php?
What is difference between get and post in php?
How to access a specific character in a string?
What is the use of imagetypes() method?
How can you upload a file using php?
Is empty function c++?
How to execute an sql query? How to fetch its result?
Which is the correct way to check if a session has already been started ?
How to display your correct URL of the current web page?
What is the use of mvc in php?
What is difference between required and include in php?
What are different types of errors available in Php?
What are the advantages of triggers?
How can I make a script that can be bilingual (supports english, german)?