Everything About PHP Sessions

Learn to handle persistent PHP sessions securely with a database, including auto-login systems and best practices for user data management.

  • Overview
  • Curriculum
  • Instructor
  • Review

Brief Summary

This course dives into the world of PHP sessions, focusing on securely storing session data in a database and building an auto-login system. You’ll learn hands-on techniques to manage user sessions efficiently while keeping security in mind.

Key Points

  • Understanding PHP sessions and how they work
  • Securing session data by storing it in a MySQL database
  • Creating an auto-login system for returning users
  • Learning to manage session lifecycle—opening, closing, and destroying
  • Recognizing security considerations and the need for re-authentication

Learning Outcomes

  • Build and manage a secure SQL database for PHP sessions
  • Implement an auto-login system using tokens
  • Understand the risks and best practices related to persistent sessions
  • Handle session data reading, writing, and destruction
  • Configure PHP to ensure persistent sessions are secure

About This Course

A complete course about handling persistent PHP sessions storing them into database securely and auto login system

PHP tireless sessions allow for communication between the server and client. This allows web applications to remember the identities of visitors as well as any variables or other data. This practical and challenging project-based course will help developers take the data that PHP normally stores in plain text files and write them into a more secure database, where the records can be read and destroyed as needed. I help you set up a SQL database, define classes to open and close sessions, read and write variables, destroy sessions, and manage out-of-date records. The lessons culminate in a short project that uses tokens to recognize returning users in an auto-login scenario.

In this course:

  • I'll show you how to store session in data in a MySQL database

  • How to log in returning users automatically

  • We'll begin with an overview of how PHP handles Sessions and stores session data in plain text files on the web server

  • We'll set up a database to store session data more securely

  • I'll show you how to define a class to open and close sessions

  • Read and write session variables to the database

  • Destroy sessions and garbage collect out-of-date records

Sessions expire as soon as soon as the browser is closed, but the highlight of this course is an auto-login system that uses a randomly generated single use token that recognizes returning users and preserves their data between visits, even on different computers. I hope you'll find this a useful and challenging project.

keeping the user's data always up to date with persistent sessions is extremely convenient. But, and I can't stress this strongly enough, persistent sessions are not 100 percent secure. When using sessions, you should always use a connection over secure sockets layer, or transport layer security whenever possible. I’m going to talk about why always re-authenticate user credentials before allowing allowing access to pages with sensitive content, such as changing user account details.

  • Configure PHP sessions to make them persistent

  • Inspect how session data is stored

  • Implement persistent sessions

Instructor

Profile photo of Eric Azimi
Eric Azimi

I am a software engineer and web developer with a passion for creating engaging and informative video tutorials about technology and programming. I hold a first-class Honours degree from one of London’s top universities and specialize in cutting-edge technologies related to software development, web development, and coding.Over the years, I’ve developed proficiency in numerous programming languages, particularly web-based ones. My...

More Courses By Eric Azimi
Review
4.9 course rating
4K ratings
ui-avatar of Alfio Sauri
Alfio S.
4.0
3 years ago

The course has the information I wanted. The instructor is knowledgeable but at times his explanations come short. However, the base knowledge is there, and he frequently makes reference to the sources to expand on any particular objective his is covering.
P.S: I ran the video at 1.5 speed.

  • Helpful
  • Not helpful
ui-avatar of Pavit Singh
Pavit S.
1.5
4 years ago

The instructor doesn't explain the code very well, he does go over the lines and mentioning them but seldom he explains how the code is working. Also i found the exact same course on linkedIn learning it is a course made by David powers and that particular course has all the same materail and even the folder structure is same, that begs the question which the real one, which the fake ? the truth is out there but according to my brilliant deductions (sarcasm), I THINK THAT THIS COURSE IS JUST A POOR COPY( NOT SARCASM ).

  • Helpful
  • Not helpful
ui-avatar of James Delancey
James D.
5.0
6 years ago

This is a fantastic course. I'm very happy that this course doesn't drag on for 100 hours typing code. People looking for a PHP primer should go do that first then come back and learn one way to do advanced sessions here. As for the content as advertised, the course covers the material well and the code that is included is well done.

  • Helpful
  • Not helpful
ui-avatar of Russ Dionne
Russ D.
4.0
6 years ago

this course does make sense .. i have it running on a godaddy server and it works.

  • Helpful
  • Not helpful
ui-avatar of Richard Rowley
Richard R.
4.0
6 years ago

There are errors in the exercise files that make the project not work. I mentioned these to the instructor via the Q&A section for this course.

  • Helpful
  • Not helpful
ui-avatar of Sunil Sharma
Sunil S.
3.0
6 years ago

The overview is too long.

  • Helpful
  • Not helpful
ui-avatar of Theresa Emmons
Theresa E.
5.0
6 years ago

Good information especially at start of class; I appreciate the programming style and follow through explanations.

  • Helpful
  • Not helpful
ui-avatar of Celia M Gaylard
Celia M. G.
5.0
7 years ago

I know nothing about php sessions and I was struggling with creating session but they were not "persistent" and my username kept "falling off". Thus far some of the information covered is assisting my greater understanding of sessions, their use and the security aspects and related configurations of which I knew nothing. I am very grateful for this knowledge.

  • Helpful
  • Not helpful
ui-avatar of Chandrashekhar Gaikwad
Chandrashekhar G.
1.5
7 years ago

The instructor did not write any code, just copy and paste every time. Need more explanation about code. I tried same code but did not work for me.

  • Helpful
  • Not helpful
ui-avatar of Jamil A
Jamil A.
2.0
7 years ago

A lot of the code is copy and paste instead of building from scratch. I think it's more beneficial for students to build it from the ground up, so that we know exactly what each line does and why. One of the best ways to do that is start with the problem and build a solution, point out its flaws and build a better solution.

Also the course says it requires basic SQL, but you also need to know about transactions and locks. The instructor is not engaged in student's Q&A's.

  • Helpful
  • Not helpful
Leave A Reply

Your email address will not be published. Required fields are marked *

Ratings

Courses You May Like

Lorem ipsum dolor sit amet elit
Show More Courses