🚀 DevOps & SRE Certification Program 📅 Starting: 1st of Every Month 🤝 +91 8409492687 🔍 Contact@DevOpsSchool.com

Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!

We spend hours on Instagram and YouTube and waste money on coffee and fast food, but won’t spend 30 minutes a day learning skills to boost our careers.
Master in DevOps, SRE, DevSecOps & MLOps!

Learn from Guru Rajesh Kumar and double your salary in just one year.


Get Started Now!

PHP intermediate essential guide- PHP using sessions

In this blog, I am going to how to use a session in PHP? So, first Now there’s also another way to store and retrieve the values on the multiple pages of the client machine (user’s browser). We can actually store it on the server.

And this gives you the ability to set session variables. and we’re just going to use the same information that we use down below and this is a good way to set. So when you authenticated them in the database with the session. And from then on you can work with that value.

If you want to see all of that information that’s held within the session. So if you want to see all of the session information we can print out and we get something like that so we get an array. If we had multiple sessions with multiple values so as to put “provide” and “provide” then we get to see that this is how it gets treated at treats it likes.

<?php
session_start();
$_SESSION["users"] = " DevOpsSchool ";
// $_SESSION["provide"] = "Tutorial.";
echo $_SESSION["users"];
// print_r($_SESSION);
?>

Output-

When add ” print_r($variable);” then work as array and print all data to which have value in this variable as like-

<?php
session_start();
$_SESSION["users"] = " DevOpsSchool ";
$_SESSION["provide"] = "Tutorial.";
$_SESSION["work"] = "Online";
echo $_SESSION["users"];
print_r($_SESSION);
?>

Certification Courses

DevOpsSchool has introduced a series of professional certification courses designed to enhance your skills and expertise in cutting-edge technologies and methodologies. Whether you are aiming to excel in development, security, or operations, these certifications provide a comprehensive learning experience. Explore the following programs:

DevOps Certification, SRE Certification, and DevSecOps Certification by DevOpsSchool

Explore our DevOps Certification, SRE Certification, and DevSecOps Certification programs at DevOpsSchool. Gain the expertise needed to excel in your career with hands-on training and globally recognized certifications.