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
How do you remove whitespace from the beginning and end of a $string variable?
Which function is used to strip whitespace?
What is difference between include,require,include_once and require_once()?
How to repeat a string to a specific number of times in php?
Is php a programming language?
Is not null mysql?
What type of errors can be occurred in php?
What is the role of php.ini file?
What is the phpstorm?
How to remove all duplicate values in array in php?
Why overriding is called runtime polymorphism?
What is the difference between pop3 IMAP and MAPI?
What is the special meaning of __sleep and __wakeup?
What are the encryption functions in php?
What is T_PAAMAYIM_NEKUDOTAYIM?