Everything About PHP Sessions (Udemy.com)

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

Created by: Amir Hassan Azimi

Produced in 2015

icon
What you will learn

  • Configure PHP sessions to make them persistent
  • Inspect how session data is stored
  • Implement persistent sessions
  • Create a SQL database to store session data
  • Implement the PHP SessionHandlerInterface
  • Write session data
  • Close and destroying sessions
  • Create an auto-login system with persistent sessions
  • Create persistent logins
  • Checkout visitor credentials
  • Authenticate users
  • Log out users selectively

icon
Quality Score

Content Quality
/
Video Quality
/
Qualified Instructor
/
Course Pace
/
Course Depth & Coverage
/

Overall Score : 86 / 100

icon
Course Description

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.Who this course is for:
  • If you want to know how to store session in data in a Mysql or MariaDB database
  • If you want to know how to log in returning users automatically
  • If you want to know how to define a class to open and close sessions
  • If you want to know how to read and write session variables to the database
  • If you want tot know how to destroy sessions and garbage collect out-of-date records

icon
Instructor Details

placeholder

I am a software engineer and web developer. My second job is to produce videos about technology and computers for people all over the world. I have a first-class degree with Honours one of the top universities in London and I am working towards the best technologies about software, coding and the web. I understand most of the programming languages mainly web-based languages. I continuously enjoy learning new technologies exclusively programming languages by watching tutorials instead of reading books and this is not mean I don't read books at all. Subsequently, reading a lot of books about computers and watching more video lectures about programming and web developing, I educated a lot of new subjects and I decided to make the professional tutorials. I am obsessed with everything about computers and fascinated by everything about programming which leads me to build things like a puzzle. By reading books I noticed they do not have that impression, sense and excitement similar to videos. I do not mean they are useless, what I mean is they are far away from fun, practical, excitement and walking through each lesson. I noticed something else and that was lack of video tutorials about computing for Persians and Farsi speaking people and that must be because of low Internet speed and Internet censorship. I found Udemy is not censored in Iran but YouTube is and that was a great news for me, which made my students asking me to find a way to allow them to download my videos. I am sure

icon
More php courses

Ultimate PHP, CSS And SASS: Enhance Your JavaScript Skills!

$11.99

Create a High End Social Network Twitter Clone In PHP, MySQL

$11.99

The Complete 2021 PHP Full Stack Web Developer Bootcamp

$11.99

Make a Google search engine clone: JavaScript PHP and MySQL

$11.99

Write PHP Like a Pro: Build a PHP MVC Framework From Scratch

$11.99

Make a YouTube Clone from Scratch: JavaScript PHP and MySQL

$11.99

icon
Reviews

4.3

14 total reviews

5 star 4 star 3 star 2 star 1 star
% Complete
% Complete
% Complete
% Complete
% Complete

By m mazraeshahi

tnx

is good

By Jorge Francisco Vera Mosquera

Muy didáctico

By Mohammad Nizam Uddin

I was looking online for a course that can teach me about PHP sessions. I found very little resources that deals with PHP sessions in depth. But finally I have come to the right place. This course indeed solved my problem. Now I have a great understanding of PHP sessions. Thanks Azimi for this great course.

By Sunil Sharma

The overview is too long.

By Celia M Gaylard

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.

By Theresa Emmons

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

By Trudy Messingham

Excellent explanations, with thorough details from a very knowledgeable tutor.

By Adolfo González

I watched the whole series in youtube, however they did not offer the files.

I'm looking for a way to secure my logins as I currently do it the wrong way (storing everything in a cookie, yeah I know it's stupid now), gladly I found this site and found the course.

So now I will be able to do it the right way and practice this step by step with the files shown in the videos to secure my users even before going into production mode :)

Thank you!

Update: After watching the whole tutorial... holly crap it's a lot to process! Now I have to digest all this information and put it in practice. Thank you for the tutorial again, will be using this for my current project as well as my new projects to protect users better.

By Richard Rowley

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.

By Markus Lommer

Nice, elaborate course on session handling. The testing setup was most helpful to recap the processes. However, some diagrams on the data and process flow would maybe enhance clearity.

By Matt

This course is very well done! The author is very knowledgeable on the subject and does a great job of explaining complex topics. Some of the code is above my current level of understanding (in PHP), but I still learned enough to create my own login and registration system. Thank you and looking forward to more courses!

By Jamil A

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.