Тёмный
No video :(

Session Management Intro with PHP 

Steve Griffith - Prof3ssorSt3v3
Подписаться 102 тыс.
Просмотров 12 тыс.
50% 1

This video covers the $_SESSION superglobal array in PHP as well as all the fundamentals of what sessions are, how they work in the browser and on the server.
The tutorial includes a simple example of creating a public and a private page with login and logout features.
public.php GIST: gist.github.co...
private.php GIST: gist.github.co...
session.php GIST: gist.github.co...
login.php GIST: gist.github.co...
logout.php GIST: gist.github.co...

Опубликовано:

 

23 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 34   
@thanhsonnguyen3212
@thanhsonnguyen3212 4 года назад
This introduction video is excellent! Exactly what I need to get started with PHP session, plus your voice sounds great.
@jglee6721
@jglee6721 3 года назад
Ditto on that. Not only the Professor presented great material, he got a smooth voice with no annoying accent. I listened to tons of videos the last couple of months and the Professor is the best.
@jdd4622
@jdd4622 3 года назад
this is the best and smoothest session tutorial I've ever saw, thank you
@osamaadeeb1002
@osamaadeeb1002 Год назад
Ohhh my God 😱😱😱 What an amazing video and amazing explanation 🤍🤍🤍🤍🤍🤍🤍🤍🤍🤍🤍🤍🤍🤍🤍
@moinkhan
@moinkhan 4 года назад
Excellent tutorial for a beginner like me. I have a much better understanding on how PHP sessions work. Thank you
@sompornsieo4624
@sompornsieo4624 4 года назад
This is what I am looking for to learn how it works about login session with PHP . Thanks.
@edwardcacho6378
@edwardcacho6378 4 года назад
Excellent explanation, thanks for your time to explain that.
@amromohmmad6579
@amromohmmad6579 2 года назад
very perfect video keep going and your voice is very excellent god job im form jordan keep doing best
@appstackerscrane9999
@appstackerscrane9999 3 года назад
Thanks Great Video, exactly what i was looking for searched for regarding phpsessid
@aakashbhatia
@aakashbhatia Год назад
you are an amazing teacher
@ahmadalkordee5879
@ahmadalkordee5879 3 года назад
I understand it completely :) thanks bro
@oldhunter3914
@oldhunter3914 Год назад
Excellent video!
@leo_7684
@leo_7684 9 месяцев назад
The best tutorial about sessions. I'd like to know how to implement that with sql
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 9 месяцев назад
The session management is still going to take place inside of PHP. However, you can add the session_id to a users table to record the current session. Or you can have a sessions table where you store session_ids and user_ids to track users and what api endpoints or web pages that they visit.
@keeplearning5647
@keeplearning5647 Год назад
thank you so much
@aadil4236
@aadil4236 4 года назад
18:15 you said session_destroy(); going to delete the file. Then how come it was still there in temp directory on your machine...?? Just curious, feel free to ignore.
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 4 года назад
It will not be an instantaneous deletion of the file.
@aadil4236
@aadil4236 4 года назад
@@SteveGriffith-Prof3ssorSt3v3 oh, and Thanks for the reply
@Anod26
@Anod26 4 года назад
Mr Teacher! Is this possible to convert Javascript sessionstorage variables to PHP variables?I try to convert in many ways, but I'm so lame in Javascript.Please explain how its done!
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 4 года назад
PHP and JavaScript can't talk to each other. PHP runs on the server while the HTML file is being built. JS runs in the browser after the page has been loaded. If you want the value of a sessionStorage value on the server then you need to use fetch( ) or XMLHttpRequest( ) to upload the value to the server.
@Anod26
@Anod26 4 года назад
@@SteveGriffith-Prof3ssorSt3v3 Thank You, I'll try :))
@michellef4668
@michellef4668 3 года назад
i have a question, what do I have to do, when I want the session id to be updated every time after a new log in?
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 3 года назад
Just redirect to the logout page which is set up to get rid of the old session. Or use the same commands as from that page. OR just call the session_regenerate_id method to change the id.
@michellef4668
@michellef4668 3 года назад
@@SteveGriffith-Prof3ssorSt3v3 the problem is that I need to do this step in a method called updateCart($old_session_id , $new_session_id), I know what session_regenerate_id and so on is doing, but I'm completely lost when I have to use this method, because it doesn't make any sense to me.
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 3 года назад
Well updateCart is something specific to your website or whatever you are building. It's not a PHP method. You will have to look through the code wherever that method is so you can figure out what it is doing.
@mayurhanwate6012
@mayurhanwate6012 4 года назад
If you login from device a And if you use that same URL in different device or browser it's going to open. With out any login required So please make a video to counter that
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 4 года назад
If you are using a session cookie, the cookie only exists on one device, the URL shouldn't matter.
@omarcybersecsoftware7494
@omarcybersecsoftware7494 3 года назад
what about if you have many users and want to each session to be for a user even if he/she refreshes
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 3 года назад
That is exactly what sessions are for. Each session id is sent back and forth as a cookie and tracks one user.
@omarcybersecsoftware7494
@omarcybersecsoftware7494 3 года назад
@@SteveGriffith-Prof3ssorSt3v3 thanks true ive logged with each devices and even after refreshing session is intact however the problem earlier is used the same machine.
@omarcybersecsoftware7494
@omarcybersecsoftware7494 3 года назад
@@SteveGriffith-Prof3ssorSt3v3 thank you bro
@SteveGriffith-Prof3ssorSt3v3
@SteveGriffith-Prof3ssorSt3v3 3 года назад
@@omarcybersecsoftware7494 sessions are attached to the cookie in a single browser. If you want to maintain sessions across multiple devices or browsers that will require building the extra logic yourself.
@omarcybersecsoftware7494
@omarcybersecsoftware7494 3 года назад
@@SteveGriffith-Prof3ssorSt3v3 you could help out please i dont know how
Далее
Simple Flower Syrup @SpicyMoustache
00:32
Просмотров 1,7 млн
Мама приболела😂@kak__oska
00:16
Просмотров 821 тыс.
PHP Front To Back [Part 16] - Sessions Tutorial
10:31
Custom Events Dispatched from Web Components
20:32
Просмотров 1,8 тыс.
Web App Pentesting - HTTP Cookies & Sessions
34:31
Просмотров 54 тыс.
Sessions in PHP: prevent session fixation attacks
4:23
Simple Flower Syrup @SpicyMoustache
00:32
Просмотров 1,7 млн