Set a value in session ?
How to set a value in session ?
session_start sends header information to the client, so call it before outputting anything.
$_SESSION['name'] = 'value';
Try out with the below example code:
/* set the session name to WebsitePHP */
$previous_name = session_name("WebsitePHP");
echo "The previous session name was $previous_name<br />";
Hope this helps.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)