Creating a Simple Session in PHP


Start a session to store data across multiple pages.

Source Code

session_start();
$_SESSION['username'] = "JohnDoe";
echo "Session started and username set.";
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments