Login form using session and cookie with remember me in php

Поділитися
Вставка
  • Опубліковано 18 вер 2024
  • Login form using session and cookie with remember me in php
    Share, Support, Subscribe!!!
    UA-cam: / learnwebcoding
    Facebook: / learnwebcoding
    Blog: dwebcoding.blog...
    GitHub: github.com/dur...
    Connect with Me:
    Linkedin: / durgesh-sahani
    Facebook: / durgeshsahani99
    Instagram: / durgesh_sahani99
    Twitter: / durgeshsahani99

КОМЕНТАРІ • 99

  • @jamesmckay5206
    @jamesmckay5206 7 років тому +2

    Really good tutorial to demonstrate the concept of cookies and sessions.

    • @graysonalan44
      @graysonalan44 3 роки тому

      Sorry to be offtopic but does any of you know of a tool to log back into an Instagram account?
      I stupidly lost the login password. I love any tricks you can offer me.

    • @thiagomitchell6173
      @thiagomitchell6173 3 роки тому

      @Grayson Alan Instablaster =)

    • @graysonalan44
      @graysonalan44 3 роки тому

      @Thiago Mitchell Thanks for your reply. I found the site through google and I'm trying it out now.
      Takes a while so I will get back to you later when my account password hopefully is recovered.

    • @graysonalan44
      @graysonalan44 3 роки тому

      @Thiago Mitchell it did the trick and I finally got access to my account again. Im so happy!
      Thanks so much, you really help me out !

    • @thiagomitchell6173
      @thiagomitchell6173 3 роки тому

      @Grayson Alan No problem xD

  • @chandandubey7280
    @chandandubey7280 3 роки тому

    ThankYou Sir, This video is very helpful in my project. very clearly you explain this remember password in this video!!

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

    Thank you.
    i have solved my problem.

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

    simple and usefull , i got what i want, thanks

  • @banafritphotography
    @banafritphotography 7 років тому +1

    Nice video. Thanks for the clear example!

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

    Great sahani bhai

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

    It's really intersting thank you sir

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

    Very good tutorial.thank you

  • @AffaAu
    @AffaAu 5 років тому +1

    A good example indeed!

  • @amjada.abuqaren2925
    @amjada.abuqaren2925 3 роки тому

    Nice Video ✔
    You have a special ❤ content here
    Great job, man 👏

  • @MoxetKhan
    @MoxetKhan 8 років тому +10

    A good tutorial, but dear why you are setting again the values with javascript, the tutorial suppose to login the user without showing login page once the cookie is set. If they will click again on login button there is no use of using cookies they can simply save in browser.
    Check cookies, if valid skip login form and goto welcome.

  • @SEKHAR0475
    @SEKHAR0475 6 років тому

    helpful video on cookies and session variables

  • @amit_sahni22
    @amit_sahni22 7 років тому

    hello... sahani ji what's up bro, This is very useful tutorial for cookie & Session.

  • @vandamieespadero6633
    @vandamieespadero6633 3 роки тому

    Setting a cookies with password is not necessary it will lead to vulnerability of your personal account. Thank you for this video.

    • @athulyasethu
      @athulyasethu 2 роки тому +1

      Then what you supposed to do instead for remember password??

  • @prankklyn9867
    @prankklyn9867 6 років тому

    i love this toturail .................

  • @HamzaAli-zr7oe
    @HamzaAli-zr7oe 7 років тому

    Thank u Very Much Durgesh,........Good Effort

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

    Thanks sir

  • @Samuel-ns5jb
    @Samuel-ns5jb 2 роки тому

    Well done sir

  • @navehhadas6764
    @navehhadas6764 7 років тому

    Great guide, thank you sir.

  • @justrosy5
    @justrosy5 2 роки тому +2

    I got it to work, then wondered about security, found a different tutorial on that, but it's code is broken. Am looking through your other videos for help with that. Do any of them address login security issues, database usage, and so on? Also, it would be really helpful if the coding was put in the video descriptions of your videos. I learn a lot from typing it all up, but I make mistakes that are hard to find and fix, since VBS Code doesn't do good debugging. Anyway, copying and pasting the code, and watching the videos all the way through would be a lot better for people like me who want to learn but just make dumb typos.

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

      Prefer code with Harry php tutorials

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

    😍😍😍 bro

  • @AvatarLandRazer
    @AvatarLandRazer 7 років тому +7

    dont store sensitive information in session nor cookie

  • @dadmehr114
    @dadmehr114 3 роки тому

    nice man🌹✔

  • @amolpisode4901
    @amolpisode4901 6 років тому

    Good Understand

  • @alassaneniane7243
    @alassaneniane7243 5 років тому +2

    merci c'est un très bon tuto . mais je crois que la récupération avec
    " if (isset($_REQUEST['login'])) {
    extract($_REQUEST); } " est plus rapide .

  • @ChandraTech52
    @ChandraTech52 8 років тому

    best cookie example ever seen on youtube ....Thank you so much (y)

  • @salamaamoyo7776
    @salamaamoyo7776 7 років тому

    very helpful for beginners

  • @gauravkorde6409
    @gauravkorde6409 7 років тому +1

    please upload video for login form to fetch userid and password from database

  • @Unknown-yl1do
    @Unknown-yl1do 3 роки тому

    thank you

  • @caleby6553
    @caleby6553 7 років тому +3

    Where is the security concerns? If you save user id and password into cookies, then anyone can see your actual password. Is that really true example of auto login?

    • @TanvirAhmed-ee4zm
      @TanvirAhmed-ee4zm 4 роки тому

      He already said this is not a proper way to save cookies. you have to encrypt email and password and then save. you can use md5 to encrypt email and password in php.

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

    easy & very helpful info, thanks but is there any way to acces $_SESSION variable by json/ajax in javascript?

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

    A mistake if you want to make cookie last for 7 days it should be 60*60*24*7 ,you set for 7 hours!!

  • @toolszm
    @toolszm 3 роки тому

    How do I set Custom cookies in session. Then User never be see in browser cookies section how do i do

  • @alialharthi7042
    @alialharthi7042 7 років тому +3

    Hi Dear Durgesh
    Thank you very much
    I think that you have missed the digit 24 in "time()*60*60*7". Because you do 7 minutes not 7 days

    • @RyuuzakiJulio
      @RyuuzakiJulio 6 років тому

      Ali Al Harthi that’s actually 7 hours. And your code is is actually multiplying by current time so yeah a mess, he got it right as + but it was not 7 days.

    • @RyuuzakiJulio
      @RyuuzakiJulio 6 років тому

      Ali Al Harthi you can also see on the cookie’s details:
      Created: Tuesday, 15 March 2016 at 22:02:17
      Expires: Wednesday, 16 March 2016 at 05:02:17
      Exactly 7 hours after creation.

    • @shannondavis5709
      @shannondavis5709 5 років тому

      It it helps anyone that wants 7 days it would be time() 86400 * 7

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

    This only remembers the e-mail and password you write on the login.php section, but I want this code to remember whater we type it to e-mail textbox and password textbox not just the one we declared on login.php

  • @harshitjain7338
    @harshitjain7338 7 років тому

    Generally websites do have remember me option but ..even then email and password cant be seen in looking browser cookie section.. Its bit unsecure
    Which method we should use if we dont want passwords and email to be shown in browser cookie (settings section).

    • @mariolukacic3568
      @mariolukacic3568 7 років тому +1

      Don't store password or username in cookie, better to make a random hash and store it to database, on return to login page check if that hash matched with a stored and login user back

    • @harshitjain7338
      @harshitjain7338 7 років тому

      Is it a standard way ... Should I Use md5 algorithm?

    • @mariolukacic3568
      @mariolukacic3568 7 років тому +1

      You can use whatever you want to make hash, you can make for example $hash = sha1(microtime(mt_rand(20-80))); so it will create hash with a number between 20-80 characters long. At least you can make a function to make more complex hash, and to validate it just reverse order of functions.

  • @aziraa7899
    @aziraa7899 7 років тому

    the probleme now I can access directly to Welcome.php from the link, how can I make it the same as validate.php, access must be via email/pass?

  • @Rakesh-ux8ui
    @Rakesh-ux8ui 2 роки тому

    anna Edit ah click panna form open aaga mathithu na .... Form show aagala bro but menu matu show aaguthu na

  • @raman2726
    @raman2726 7 років тому

    In login.php file inside tag you are using variables $email and $pass inside quotes. Is it right?

    • @mariolukacic3568
      @mariolukacic3568 7 років тому +1

      better don't use this code your site will be hacked so easy

    • @harshitjain7338
      @harshitjain7338 7 років тому

      yeaah,... SQL Injection is a bastard

    • @a.yashwanth
      @a.yashwanth 4 роки тому

      @@harshitjain7338 then using placeholders good idea?

  • @monumishra-g3756
    @monumishra-g3756 6 років тому

    sir जी कोई भी व्यक्ति इंडेक्स के पेज को यूआरएल से भी तो खोल सकता है बिना लॉगिन करे तो हम ऐसा क्या करे की कोई भी बिना लॉगिन के इंडेक्स पेज को न देख पाए इ
    if else conditions का इस्तमाल करे तो कितनी बार करे मेरे इंडेक्स पेज में 42 फॉर्म action url है

  • @vineetkumar9391
    @vineetkumar9391 7 років тому +1

    sir you should clear all the things u have added in it why u r using -1 and what changes u made I didn't get . I think there is some problem with ur video and audio . you are doing something and saying somthng

  • @yogeshsahni5808
    @yogeshsahni5808 5 років тому +1

    code bhi daal dete bhai description me

  • @sirji34
    @sirji34 3 роки тому

    Sir can u help to user login date and time or ip address store in data base

  • @itzseben
    @itzseben 7 років тому +1

    could i get the code please??

  • @khushitshah979
    @khushitshah979 5 років тому

    How you mage url tutorila/.. something which server application you use

    • @learnWebCoding
      @learnWebCoding  5 років тому

      I am using virtual host for it. For more details please check this ua-cam.com/video/SrK7yVwkE-k/v-deo.html

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

    after login i click back button from home page to login page and click forward button it is going to homepage without asking login details how to fix it please help me

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

      Hmm? Sounds like your cookies, sessions are set. Isn't that supposed to be the case?

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

    Please share your code with us

  • @dileepkumarpal9170
    @dileepkumarpal9170 6 років тому +2

    sir can pz send the source code

  • @junedshaikh5162
    @junedshaikh5162 7 років тому

    at the time of revision your video going forword !

  • @granrethory1691
    @granrethory1691 5 років тому

    where can download?

  • @kjrbst
    @kjrbst 5 років тому

    Hello my name is Richald flom Miclosoft techsuppolt

  • @mpg20011
    @mpg20011 7 років тому

    I don't get this! one of the basic tenets of php sessions is that start_session() must be the first thing on the page. Here, in his validate.php he starts a session in the middle of a mess IF() statements. How does that work?

    • @tijana5398
      @tijana5398 7 років тому +3

      You can put it wherever you want inside ,as long as it is above html tags ..

  • @erfanchowdhury3962
    @erfanchowdhury3962 7 років тому +12

    audio and video synchronization is very bad.

  • @vinodKumar-vc4vm
    @vinodKumar-vc4vm 5 років тому

    hello sir why use cookies

    • @learnWebCoding
      @learnWebCoding  5 років тому

      Check this video ua-cam.com/video/oWuCQkDQi-s/v-deo.html
      here I have explained what is cookie.

  • @pianoLee-sx9dx
    @pianoLee-sx9dx 6 років тому +2

    Hello! I am trying to include an email into my validation form and have been following another tutorial so would appreciate if you could provide me with some assistance while maintaining the same structure... I want to include a rule where certain symbols such as @ is required but not sure how to do it in my form. Here is part of my code..

  • @akankhaahmed
    @akankhaahmed 7 років тому +1

    Hi, your video and audio not sync after few munites can you mute your audio re-record your audio and just add the soundtrack .

    • @mulualemabate3193
      @mulualemabate3193 7 років тому

      you can mute the video and can play the audio you want on another media player...:)

  • @drcortoglu
    @drcortoglu 7 років тому

    well, it is not about the main subject of this video but can i ask you how to change "localhost" to "tutorials" ?

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

    this video sucks when audio is not synced with the video.......

  • @mahmoods9861
    @mahmoods9861 3 роки тому

    your style of presenting tutorial is not good. work on your tutorial before you upload. make sure not much surprises exist in vdo.

  • @maximilianotorres1225
    @maximilianotorres1225 6 років тому +1

    "hello friends hamburgesa ani"
    sorry XD

  • @mehmetercu6750
    @mehmetercu6750 3 роки тому

    A lot of mistake in this video 😠👎👎👎

  • @pinto126
    @pinto126 6 років тому

    instead of .value .InnerHTML would work

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

    not understandable your video..

  • @user-mq2dp2ud3y
    @user-mq2dp2ud3y 4 роки тому

    your writing is so slow.work on it.thank

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

    Nice sir👍👍👍👍👌👌👌