Everything About PHP Sessions
4.2 (12 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
104 students enrolled
Wishlisted Wishlist

Please confirm that you want to add Everything About PHP Sessions to your Wishlist.

Add to Wishlist

Everything About PHP Sessions

A complete course about handling persistent PHP sessions storing them into database securely and auto login system
4.2 (12 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
104 students enrolled
Created by Hassan Azimi
Last updated 10/2015
English
Current price: $10 Original price: $20 Discount: 50% off
1 day left at this price!
30-Day Money-Back Guarantee
Includes:
  • 3.5 hours on-demand video
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
Have a coupon?
What Will I 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
View Curriculum
Requirements
  • This is not a beginner's course, so you need to have a solid grasp of PHP syntax, including the use of control structures, loops, and arrays.
  • You should also be comfortable working with PHP classes and objects. Nearly all of the code in this course is object oriented.
  • You should understand basic SQL for select, insert, update, and delete queries.
  • A lot of the code uses PDO-prepared statements with named parameters to submit queries to the database, so you should be familiar with using PDO.
  • You need to know HTML and a little CSS
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 is the target audience?
  • 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
Students Who Viewed This Course Also Viewed
Curriculum For This Course
Expand All 25 Lectures Collapse All 25 Lectures 03:43:41
+
Introduction
1 Lecture 04:51
+
Security and Sessions
5 Lectures 55:42

Session Configurations
08:44

Changing Configurations
15:05

Session Inspection
12:00

Session Implementation
10:32
+
Database for Sessions
3 Lectures 22:22
Database Setup
06:40

Create Database Tables
08:08

Connect to Database
07:34
+
Storing Session Data in Database
6 Lectures 52:10
Session Handler Interface
07:46

Open and Read Methods
15:03

Write Method
08:57

Close Method
06:55

Destroy Session
02:34

Using Session Handler
10:55
+
Building an Autologin System
6 Lectures 49:14

Using Trait
03:46

Persistent Session Handler
05:14

Auto Login Class
17:21

Auto Login Helpers
14:15

Logging Out
04:21
+
Testing
4 Lectures 39:22
User Registration
11:46

PSR-4 Auto Loader
10:01

User Auto Authentication
08:32

Extra Files
09:03
About the Instructor
Hassan Azimi
4.2 Average rating
511 Reviews
10,589 Students
5 Courses
Software Engineer and Web Developer

Hi My name is Hassan Azimi and I am a software engineer and a web developer. My second job is to produce videos about technology and computers for people all over the world. I have first class degree with Honours one of the top universities in London and I am working towards the best technologies about software, coding and he 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 some people do not learn only by reading as some people do. Most people who computing is their career are practical people rather than people with humanity subjects, one them is myself. I am a practical person, I learn by watching. Therefore, I decided to make video tutorials. Today I am the only best Persian tutorial source for all Persians and the only one who makes really professional tutorials with great video and audio quality. If you watch my tutorials you will notice I really care about every single video tutorials I make and I have so much respect to Udemy academy which I think it is one of the best ideas.