Session Management Intro with PHP

Поділитися
Вставка
  • Опубліковано 29 лис 2024

КОМЕНТАРІ • 34

  • @osamaadeeb1002
    @osamaadeeb1002 Рік тому +1

    Ohhh my God 😱😱😱
    What an amazing video and amazing explanation 🤍🤍🤍🤍🤍🤍🤍🤍🤍🤍🤍🤍🤍🤍🤍

  • @jdd4622
    @jdd4622 3 роки тому +3

    this is the best and smoothest session tutorial I've ever saw, thank you

  • @thanhsonnguyen3212
    @thanhsonnguyen3212 4 роки тому +6

    This introduction video is excellent! Exactly what I need to get started with PHP session, plus your voice sounds great.

    • @jglee6721
      @jglee6721 3 роки тому +2

      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.

  • @d4gr
    @d4gr 4 роки тому +3

    Excellent explanation, thanks for your time to explain that.

  • @amromohmmad6579
    @amromohmmad6579 3 роки тому +1

    very perfect video keep going and your voice is very excellent god job im form jordan keep doing best

  • @moinkhan
    @moinkhan 4 роки тому +2

    Excellent tutorial for a beginner like me. I have a much better understanding on how PHP sessions work. Thank you

  • @หมูจ๋า-Thailand
    @หมูจ๋า-Thailand 4 роки тому +2

    This is what I am looking for to learn how it works about login session with PHP . Thanks.

  • @appstackerscrane9999
    @appstackerscrane9999 4 роки тому +2

    Thanks Great Video, exactly what i was looking for searched for regarding phpsessid

  • @aakashbhatia
    @aakashbhatia 2 роки тому

    you are an amazing teacher

  • @ahmadalkordee5879
    @ahmadalkordee5879 3 роки тому +1

    I understand it completely :) thanks bro

  • @oldhunter3914
    @oldhunter3914 Рік тому

    Excellent video!

  • @leo_7684
    @leo_7684 Рік тому

    The best tutorial about sessions. I'd like to know how to implement that with sql

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  Рік тому

      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 роки тому +1

    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.

  • @michellef4668
    @michellef4668 4 роки тому

    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  4 роки тому +1

      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 4 роки тому

      @@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  4 роки тому +1

      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.

  • @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 роки тому +1

      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 роки тому +1

      @@SteveGriffith-Prof3ssorSt3v3 Thank You, I'll try :))

  • @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 роки тому +1

      @@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

  • @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 роки тому +2

      If you are using a session cookie, the cookie only exists on one device, the URL shouldn't matter.