Great tutorial, well explained. Been building a database and need to add in a login system for different levels of access. This gave me some great ideas
This video helped a lot. I am new to php and web development and was very confused among sessions and cookies. Thanks a lot. Would like to know, how php manages between two different sessions, in demo you have not assigned any unique id to the session, it's just start_session();
That was just great, thank you loved it, Question so I want to play a video on my site and as the person goes through the site i want to remember where they left off on the video, even if they leave, so naturally after watching your tut, i see i would use a cookie not a session, but how would i capture where they were on the video with regard to time elapsed, and how do i load the video to that spot when they return ? I know thats sounds like a mouth full but if it makes sense I am sure you can give some insight ? thank you very much.
Sorry, just a little confused here based off of the video compared to how my professor explained it in class. The example you gave with the shopping cart, wouldn't that be less important/permanent data and therefor be more viable as storage in a cookie as opposed to the login/logout mechanism where the session indefinitely stores users login information until logout?
The clients browser never sees the $_SESSION data unless your output it before the page is rendered. The only info the browser has is the session id which is needed to match the client to session. The client can not request any data from the session on its own. If you want to transfer secure info from say a login or a webform then use HTTPS. The client can alter $_GET and $_POST
Alagie Singhateh 1 second ago hello sir, I come across your video while I was trying to fix my cookie problem. when I inserted my cookies into the database and if I want to see them all in my cookie model I show your cart is empty while inside my database is having some products already inserted into them. could you please help me to fix that please or I can even send you the code to check it for me if necessary? thank you so much waiting to hear from you soon as possible.
What should I use sessions or cookies if someone buys products, then stock of products will decrease, but they did not confirm / pay for it, so that their purchases will be canceled and stock products will increase again.
Hi, i have a problem on my website after user loges in or loges out session have some kind of delay and user stays loged out or loged in for next 10 15 seconds.
hey i am making a project management system i want userid is stored in user and i also want to use it in proposal as a foreign key can you guide me how can i do that
What happens to the session data if you're redirected away from site A to another site - site B (e.g. paypal to take a payment) and then site B sends you back to site A? Will the session data from site A stored before the redirect still be there when you return from site B?
The server won't know they left the page because that happens client-side. So, the session will remain. I think default length for sessions is 20 minutes... but will depend on server configuration.
Honestly, no idea. My guess is there's an edit I made in there and the page got refreshed "off-camera" for some reason. Maybe, my cat attacked my microphone or something. I don't think it has anything to do with the script itself.
Very boring. I think to make it better, you should put the code on one side of the page, and then the browser on the other side. So, you can see the changes made faster. Most of the time, I just stare at your blank browser with a few text.
Great tutorial, well explained.
Been building a database and need to add in a login system for different levels of access. This gave me some great ideas
+colonelvector awesome! Glad to hear that.
Thank you very much for your simple but efficient explanation.
+Don Pro no problem!
This video helped a lot. I am new to php and web development and was very confused among sessions and cookies. Thanks a lot.
Would like to know, how php manages between two different sessions, in demo you have not assigned any unique id to the session, it's just start_session();
you have the best videos on youtube
Smarts commenter ever! :)
That was just great, thank you loved it,
Question so I want to play a video on my site and as the person goes through the site i want to remember where they left off on the video, even if they leave, so naturally after watching your tut, i see i would use a cookie not a session, but how would i capture where they were on the video with regard to time elapsed, and how do i load the video to that spot when they return ?
I know thats sounds like a mouth full but if it makes sense I am sure you can give some insight ?
thank you very much.
Sorry, just a little confused here based off of the video compared to how my professor explained it in class. The example you gave with the shopping cart, wouldn't that be less important/permanent data and therefor be more viable as storage in a cookie as opposed to the login/logout mechanism where the session indefinitely stores users login information until logout?
My understanding is that he did recommend cookies for that scenario, didn't he?
Best place to learn, thanking you bro.
No problem
The clients browser never sees the $_SESSION data unless your output it before the page is rendered. The only info the browser has is the session id which is needed to match the client to session. The client can not request any data from the session on its own. If you want to transfer secure info from say a login or a webform then use HTTPS. The client can alter $_GET and $_POST
Excellent tutorial. Nice explanation.
best tutorial video ever ..
lasskiss kshettri thanks! :)
nice tutorial i learned so much new from it! subscribed and liked
+Meto appreciate that!
nice tutorials
Thanks bud!
Alagie Singhateh
1 second ago
hello sir, I come across your video while I was trying to fix my cookie problem. when I inserted my cookies into the database and if I want to see them all in my cookie model I show your cart is empty while inside my database is having some products already inserted into them. could you please help me to fix that please or I can even send you the code to check it for me if necessary? thank you so much waiting to hear from you soon as possible.
Thank you, helpful tutorial!
+Ankaboot no problem!
Thank you great help .
Can I use cookies instead of sessions in the first example?
its a great help sir. thank u
no problem
What should I use sessions or cookies if someone buys products, then stock of products will decrease, but they did not confirm / pay for it, so that their purchases will be canceled and stock products will increase again.
Why don't you advise using sessions for login purposes?
I have the same question. Why sessions are not good for login purposes and what would be the proper way to make a login using php?
Sessions are better for a login system. It's more safe than cookies.
Sessions are actually better for login
If one closes the browser then sessions are gone. You can not re log in with sessions then.
Hi, i have a problem on my website after user loges in or loges out session have some kind of delay and user stays loged out or loged in for next 10 15 seconds.
Then, is it smart to use cookies each time you need to and forget about sessions?
Thanks a lot :)
hey i am making a project management system i want userid is stored in user and i also want to use it in proposal as a foreign key can you guide me how can i do that
helpful
What happens to the session data if you're redirected away from site A to another site - site B (e.g. paypal to take a payment) and then site B sends you back to site A? Will the session data from site A stored before the redirect still be there when you return from site B?
The server won't know they left the page because that happens client-side. So, the session will remain. I think default length for sessions is 20 minutes... but will depend on server configuration.
John Morris Wicked, thanks so much for the quick reply. Great tutorial too, really helped
JanitorJo no problem and thanks! :)
hi I wanna get the user_id from the databases how can i do it please.
ameur semeh you need to be more specific with your question ?
I found it.
and i ment how to filtre the database using user_id ... thank's :)
ATTENTION PLEASE
when you changed between pages...the number incremented by 2 and not by 1..why sir??
That was so long ago. What time in the video did this happen?
The John Morris Show 7:58..when you changed between pages
Honestly, no idea. My guess is there's an edit I made in there and the page got refreshed "off-camera" for some reason. Maybe, my cat attacked my microphone or something. I don't think it has anything to do with the script itself.
Hey guys! Can someone assist me with my code? I am trying to create a remember function but the hash is not storing into my database..
Good, but you should have a more continuous speech. It's a bit mind-slowing
next time please show full screen
nice tutorial, i hope u can make it shorter ..
Very boring. I think to make it better, you should put the code on one side of the page, and then the browser on the other side. So, you can see the changes made faster. Most of the time, I just stare at your blank browser with a few text.
+neocyndaquil literally how every video I do now is