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.
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.
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.
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.
@@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.
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.
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!
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.
@@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 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.
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
Ohhh my God 😱😱😱
What an amazing video and amazing explanation 🤍🤍🤍🤍🤍🤍🤍🤍🤍🤍🤍🤍🤍🤍🤍
this is the best and smoothest session tutorial I've ever saw, thank you
This introduction video is excellent! Exactly what I need to get started with PHP session, plus your voice sounds great.
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.
Excellent explanation, thanks for your time to explain that.
very perfect video keep going and your voice is very excellent god job im form jordan keep doing best
Excellent tutorial for a beginner like me. I have a much better understanding on how PHP sessions work. Thank you
This is what I am looking for to learn how it works about login session with PHP . Thanks.
Thanks Great Video, exactly what i was looking for searched for regarding phpsessid
you are an amazing teacher
I understand it completely :) thanks bro
Excellent video!
The best tutorial about sessions. I'd like to know how to implement that with sql
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.
thank you so much
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.
It will not be an instantaneous deletion of the file.
@@SteveGriffith-Prof3ssorSt3v3 oh, and Thanks for the reply
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?
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.
@@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.
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.
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!
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.
@@SteveGriffith-Prof3ssorSt3v3 Thank You, I'll try :))
what about if you have many users and want to each session to be for a user even if he/she refreshes
That is exactly what sessions are for. Each session id is sent back and forth as a cookie and tracks one user.
@@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.
@@SteveGriffith-Prof3ssorSt3v3 thank you bro
@@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.
@@SteveGriffith-Prof3ssorSt3v3 you could help out please i dont know how
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
If you are using a session cookie, the cookie only exists on one device, the URL shouldn't matter.