4. Food Order Website with PHP and MySQL (Login - Authentication and Access Control - Authorization)

Поділитися
Вставка
  • Опубліковано 5 січ 2025

КОМЕНТАРІ • 297

  • @zeustheboerboel3794
    @zeustheboerboel3794 3 роки тому +13

    This has become my favorite time pass now, coding with vijay. Please make many more tutorials.

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

      I'm really glad that you're enjoying the course.
      Also if you think the tutorials could be helpful to others, then please SHARE with your family and friends.
      It helps this channel to GROW and your loved ones can also learn Web Development for FREE.
      Thanks and Regards!

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

    You are the best vijay,,continue mentoring people it really goes a long way bro, i appreciate alot!

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

      Thank you so much for following the tutorials.
      And I'm really glad that you enjoyed the course.
      Also if you think the tutorials could be helpful to others, then please SHARE with your family and friends.
      It helps this channel to GROW and your loved ones can also learn Web Development for FREE.
      Thank you so much for your love and support.

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

    28:28 this time you tell about md5 before that I tried many times but I failed and I started to find errors .. so funny . you are a great teacher

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

      I'm really glad that the tutorials are helpful to you.
      Hope you complete all the episodes soon.
      Best Wishes!

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

    1:15 create login page
    2:10 link css
    2:45 design page
    4:40 css - login, width, border
    5:35 refresh css page source
    6:40 css - margin
    7:20 css - padding
    7:40 align text to center
    8:30 create form
    12:20 align text in form
    13:30 login functionality
    14:00 php - isset(), check submit button is clicked
    15:00 php - get data from login form
    16:50 php - sql statement find user
    18:00 php - execute the query
    18:30 include constants file
    20:00 php - check if user exists
    21:25 php - $_SESSION[], test message for login
    22:35 php - header(), redirect to admin dashboard
    24:00 error message if invalid login in login page
    25:10 success message login in dashboard page
    26:00 align text for message
    27:50 php - md5()
    29:00 add logout button in partials/menu
    29.30 create logout page
    30:20 destroy session
    31:20 include constants
    33:00 access control, $_SESSION[‘user’]
    34:15 unset() user
    37:00 create partials/login-check page
    37:50 check if user not logged in yet
    40:30 include login-check in menu page
    42:00 error message in login page if user not logged
    42:55 align text for error message
    Finished, well done!

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

      I'm really glad that you're enjoying the course.
      Hope you complete all the tutorials soon.
      Thanks and Regards!

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

    Sir, all are working nicely...
    Thank you so much

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

      Awesome 👏
      Hope you completed all the tutorials.
      Thanks and Regards!

  • @cindydahiana
    @cindydahiana 6 місяців тому +1

    thank you so much for your effort in this course.

    • @VijayThapa
      @VijayThapa  6 місяців тому

      My pleasure!
      Hope you completed all the tutorials and were helpful to you.
      Thanks and Regards!

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

    Learn so much from this one and excellent explanation. Thanks for sharing to us!

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

      I'm really glad that it was helpful to you.
      Hope you completed all the tutorials.
      Also if you think the tutorials could be helpful to others, then please SHARE with your family and friends.
      It helps this channel to GROW and your loved ones can also learn Web Development for FREE.
      Thanks and Regards!

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

    All the best m. Thapa
    You really hild me levevls up in coding

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

      Thank you so much.
      I'm really glad that the tutorials were helpful to you.
      Also if you think the tutorials could be helpful to others, then please SHARE with your family and friends.
      It helps this channel to GROW and your loved ones can also learn Web Development for FREE.
      Thank you so much for your love and support.

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

    i hope you doing well Vijay! thankyouuu for this course

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

      It's all good now brother.
      Thank you so much for following the course.
      Hope it's helpful to you.
      Also if you think the tutorials could be helpful to others, then please SHARE with your family and friends.
      It helps this channel to GROW and your loved ones can also learn Web Development for FREE.
      Best Wishes!

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

    4th stage and already learned a lot ! :X

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

      I'm really glad to know that the tutorials are helpful to you.
      Best Wishes for further learning.
      Also if you think the tutorials could be helpful to others, then please SHARE with your family and friends.
      It helps this channel to GROW and your loved ones can also learn Web Development for FREE.
      Thanks and Regards!

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

    the best Man ,good content

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

      Thank You So Much @Ibrahim khed.
      I'm really glad that you're enjoying the course.
      Also if you think they can be helpful to others, then please SHARE with your family and friends.
      It helps this channel to GROW and your loved ones can also learn Web Development for FREE.
      Best Wishes!

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

    Very helpful Video 👍

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

      Thank you so much.
      I'm really glad that the tutorials were helpful to you.
      Hope you complete all tutorials soon.
      Also if you think the tutorials could be helpful to others, then please SHARE with your family and friends.
      It helps this channel to GROW and your loved ones can also learn Web Development for FREE.
      Best Wishes!

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

    Good job Vijay a good teacher and a great coach in programming

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

      Thank You So Much @Linus Mugera,
      I'm really glad that you're enjoying the course.
      And if you think the course is helpful to you and can be helpful to others as well, then please SHARE with your family and friends.
      It helps this channel to GROW and your loved ones can also learn Web Development for FREE.
      Thanks and Regards!

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

      @@VijayThapa You most welcome, Definitely I will share it with my fellow junior developers and help the channel grow. I want to be among the best developers in Africa that has graduated from your channel better coach us well

  • @JamesPaulCeazarY.Bellosillo
    @JamesPaulCeazarY.Bellosillo 3 місяці тому

    My advice for this one to make it easier to reload 6:13
    just hold CTRL+SHIFT then click R
    to reload it fully

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

    thank you for this tutorial, man!

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

      I'm really glad that the tutorials were helpful to you.
      Also if you think the tutorials could also be helpful to others, then please SHARE with your family and friends.
      It helps this channel to GROW and your loved ones can also learn Web Development for FREE.
      Thank You So Much!

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

    I wish I found your channel earlier, Your videos are very easy to understand.

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

      Glad you like them!
      Hope you complete all the tutorials soon.
      Best Wishes!

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

    Thank you, I was looking for this..

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

      You're welcome @Benn.
      Hope you enjoyed the tutorial.
      And It'd be a great support to grow this channel if you share the videos with your loved ones.
      It also helps your friends and family to learn Software and Web Development for FREE.
      Bes Wishes!

    • @MAZEDURRAHAMAN
      @MAZEDURRAHAMAN 4 роки тому +1

      How many episodes will be uploaded for This series

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

      Around 5 - 6 episodes more.
      So In total (10 episodes) in this course.

  • @advanced-developers
    @advanced-developers 3 роки тому +1

    Good video. Keep it up 💕

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

      Thank You So Much.
      Hope the tutorials were helpful to you.
      Also if you think the tutorials could be helpful to others, then please SHARE with your family and friends.
      It helps this channel to GROW and your loved ones can also learn Web Development for FREE.
      Thanks and Regards!

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

    It's amazing series & plz make the big ecom project

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

      I’m really glad that you enjoyed the course.
      And for sure I’ll make new courses.
      Hope to see you on new courses.
      Thanks and Regards!

  • @emmysmith8960
    @emmysmith8960 4 роки тому +1

    Master thank u awesome for me. Keep pushing sir .

    • @VijayThapa
      @VijayThapa  4 роки тому +1

      Thank You So Much @Emmy.
      And I'm really glad to know that you're enjoying this course as well.
      Best Wishes!

    • @emmysmith8960
      @emmysmith8960 4 роки тому +1

      Thank u sir

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

    I have done My minor project with the help of your this video ..

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

      Wow! That's really amazing. And I'm really glad that the course was helpful.
      Hope to see your awesome new projects as well.
      Also if you think the course could be helpful to others then please SHARE with your family and friends.
      It helps this channel to GROW and your loved ones can also learn Web Development for FREE.
      Thanks and Regards!

    • @shashankgopisetty4679
      @shashankgopisetty4679 9 місяців тому

      Can you send the code

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

    Thank you very much!

  • @HighlightHub-x1b
    @HighlightHub-x1b Рік тому

    28:25 That md5 isn't working. It show same Username and password did not match after using md5 also

    • @VijayThapa
      @VijayThapa  11 місяців тому

      You might have error in your code.
      Please check it once.
      Best Wishes!

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

    Please am following this for my real estate website. How can i convert this user login to book an inspection page?

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

      Similar to this,
      "Add User" could be your Register Page,
      "Login" could be your User Login.
      Concept is similar everywhere.
      Please try to understand logic no matter whose course you follow.
      Best Wishes!

  • @POOJAKUMARI-vl1my
    @POOJAKUMARI-vl1my Рік тому

    at 28:39, i am not able to redirect to dashboard even after adding a new admin in the DB , plzzzzzz someone help me

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

      What error do you get?
      Please check your code once.
      You might have some error.
      If needed, watch the tutorial once again and compare the code.
      It might help you to find the error and fix it.
      Thanks and Regards!

    • @POOJAKUMARI-vl1my
      @POOJAKUMARI-vl1my Рік тому +1

      @@VijayThapa tysm for the reply...i got it done

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

    Thank you ❤

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

      You’re welcome brother.
      Hope the tutorials are helpful to you.
      Also if you think the tutorials could be helpful to others, then please Share with your Family and Friends.
      It helps this channel to grow and your loved ones can also learn Web Development for Free.
      Thanks and Regards!

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

    I learn a lot from your tutorial. where the part 2 and 3?

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

      Hi Ahmed, Thank you so much for following the tutorials.
      Please follow the link below for complete tutorial playlist
      ua-cam.com/video/ZBgTzx46B8s/v-deo.html
      Best Wishes!

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

    Thank you very much

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

      You are welcome!
      Hope you enjoyed the tutorials.
      Also if you think the tutorials could be helpful to others, then please SHARE with your family and friends.
      It helps this channel to GROW and your loved ones can also learn Web Development for FREE.
      Thanks and Regards!

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

    thank you sir so much, but i want to ask if later on the project we could order food? and could it be end at the last of december?

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

      Hi @zhuge liang,
      Thank you so much for following the tutorials.
      And yes, the course will be completed by the end of this December.
      Thanks and Regards!

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

    hello sir please i cant log in to the system,when i link the login-check.php, it redirects me to login page with error message please log in to access admin panel even when i input correct user name and password.but it works well when i comment the login-check redirection thanks

    • @ParthPatel-cs3pw
      @ParthPatel-cs3pw 3 роки тому

      same here bro

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

      Try adding following code at the top of "constants.php" file.
      Thanks and Regards!

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

      @@VijayThapa me too sir when ever i include login-check.php, it always give the error message and redirect me to login.php, even I login with correct username and password, it doesn't work properly until I remove the include login-check.php can u help me please, also none of the session message display except this one, even I checked that the code correct.
      thanks in advance.

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

      ​@@VijayThapa Well this doesn't work for me tho.

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

      @@lnnovati Instead of creating a separate file for "login-check", try adding the code inside it at the top of menu.php or index.php

  • @سیدجوادعلوی-ق6ي
    @سیدجوادعلوی-ق6ي 3 роки тому +1

    thanks a lot...it is very good and best...it would be better use biger font in your editor...its better for eyes! (from iran)

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

      I'm really glad that the tutorials are helpful to you.
      Thank you so much for the suggestions.
      I really appreciate it and I'll try to make it better on new courses.
      Also if you think the tutorials could be helpful to others, then please SHARE with your family and friends.
      It helps this channel to GROW and your loved ones can also learn Web Development for FREE.
      Thanks and Regards!

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

    28:31 i m unalbe to do login with new user like admin. Again n again it is showing me Username or password did not match. I have done all the steps properly and also applied md5. Please help

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

      While adding the admin, did you encrypt the password?
      or did you encrypt the password while login?
      Please check those and let me know.

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

      @@VijayThapa I had solved my problem sir. Thank you 😊

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

      @@shamstabrezkhan9550 how did u solve it coz i have the same problem?

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

    It's like whenever I try to include the file /login-check.php/. An Error message pops up and it requires me to login to grant access to the admin panel meanwhile I entered existed username & password implying to my database. Nonetheless, it can only work when I remove the include 'login-check.php' part. I have tried the previous methods you have provided to other people who posted about the same issues though. Thanks in advance.

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

      Try adding the code inside the login-check.php at the top of menu.php or index.php
      It might fix the error.
      Best Wishes!

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

      same problem bro ,what i do resolve this problem

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

      hi, were you able to fix the problem?

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

    Sir, is it possible to a user to access the foods available and login through the same login page of admin???

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

      Can you make it more clear please?
      Based on what I understood.
      This project does not require normal users to login. Only Admins need to, for managing categories, foods and orders.
      And yes it is possible to make same login for both users and admins, but access or roles must be different.
      Hope it's helpful.
      Thanks and Regards!

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

    Fantastic series

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

      I'm really glad that you liked the tutorials.
      Hope they're helpful to you.
      Also if you think the tutorials could be helpful to others, then please SHARE with your family and friends.
      It helps this channel to GROW and your loved ones can also learn Web Development for FREE.
      Best Wishes!

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

      Sure sir..

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

    Thank you sir
    I need your help. I have a problem in If (count==1) in login it read the first condition only and doesn't check the second one

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

      Email me at hi@vijaythapa.com with the screenshot of your error and code.
      Thanks and Regards!

  • @meghana-nw3eg
    @meghana-nw3eg Рік тому

    This project is wonderful!! Had learnt new thing I have doubt I am unable to access the home page after authorization (through login page also). Plz help me in solving this error tq

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

      Please check your code once again.
      You might have error in your SESSION or if-else condition.
      If needed, watch the tutorial once again and compare the code.
      It might help you to find the error and fix it.
      Best Wishes!

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

    There's a security flaw with this design. If you include the login-check.php in menu, then you can still delete admin users by just accessing admin/delete-admin.php?id=[id] without needing to be logged in. I would suggest including login-check in pages that don't have the navigation menu as well. This doesn't seem like a very good modular design practice though, so I'd like to know if there's a good alternative. Maybe don't include constants in the login page and just hard wire the constant data for the login page. Then include login-check.php in constants and menu?

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

      I also included login-check after constants and put the entire code in an if statement, so the code only parses if user session is set. This way if the user is logged in, the login-check doesn't do anything and the code works normally and deletes the user with the set id. If no user is logged on, the login-check will store the $_SESSION['no-login-message'] and redirect to login page and display the no-login-message. The code for deletion won't work cause it doesn't validate the if statement, so nothing happens, just a redirect and a message. I don't know if it's the right way, but it works for me. Code below:

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

    after adding $session['user'] for check whether the user is logged in or not the browser shows "This page isn’t working localhost redirected you too many times.
    Try clearing your cookies." This message i can't slove it by clearing the caches and cookies what can i do?

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

      It should be " $_SESSION['session_variable'] "
      not $session.
      Thanks and Regards!

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

    Sir I'm not getting value at 15:57 my page just refresh and nothing happens! Please help

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

      That means, you've not written the code properly.
      Check your code after button clicked.
      Watch the tutorial once again if needed and compare the code.
      It might help you to find the error and fix it.
      Thanks and Regards!

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

      @@VijayThapa okay sir thank you👍

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

    hello sir what if my log in page if i try to type the user and password i cannot enter into the pages different pages

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

      Is your username & password correct?
      Also check whether you've encrypted password with MD5 while adding user, updating user and comparing user or not.
      If needed watch the tutorial once again and compare the code.
      It might help you to find the error and fix it.
      Thanks and Regards!

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

    last session is not working. After logout, I can go to all pages and it is not asking for login admin. May you please help me out. why?

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

      Please watch the tutorial once again and compare the code.
      It might help you to find the error and fix it.
      Thanks and Regards!

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

    I want to ask you,
    The user can go to login page if he login or he must be logout from his account at first ?
    All regards from GAZA❤

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

      Did you understand the concept of authentication and authorization?
      If you've, then you can fix the issue in either condition.
      "Experiment More, Learn More".
      Thanks and Regards!

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

    @Vijay Thapa if i want to add register for this webiste and connected to database how do i add?

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

      Register is similar to Add-Admin.
      You need to add "User Type" column in tbl_user where you save whether the user is "Admin" or "Normal User".
      I'll try to so something similar on new course.
      Best Wishes!

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

      ​@@VijayThapaokok Thanks you.

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

    yamete kudasai! this video is great!

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

      Thank You So Much!
      I'm really glad that you enjoyed the videos.
      Also if you think the tutorials were helpful to you and can help others as well, then please SHARE with your family and friends.
      It helps this channel to GROW and your loved ones can also learn Web/Software Development for FREE.
      Thanks and Regards!

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

    Did anybody got the code work after adding login-check.php file. If so please help me. I got stuck. I got empty page with error "This page isn't working".

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

      you might have error on either including the login-check file or redirection path.
      Please check it once.

  • @Riya-ls1kv
    @Riya-ls1kv 2 роки тому

    43:09
    m getting a warning: : Undefined array key "no-login-message" in C:\xampp\htdocs\food-order\admin\login.php on line 23
    although my code has no error... please tell about this warning message!!!

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

      Do you have anything called "no-login-message"?

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

    How to add an images in login and register's page background?

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

      Just add with HTML tag.
      If you want to learn Web Design with HTML & CSS then please follow theses courses
      ua-cam.com/video/VaV_Ro8jpPY/v-deo.html
      Best Wishes!

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

    can i get the code .
    thank you so much ...this series helpes me alot in my lab project....

  • @Bhavika02-c
    @Bhavika02-c 2 роки тому

    Sir I've got an error of "localhost redirected you too many times (try clearing your cookies)" while login the admin page. what should i do? Even I clear cookies too still error isn't going

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

      Check you login page code.
      You might have missed something.
      If needed, watch the tutorial once again and compare the code.
      It might help you to find the error and fix it.
      Thanks and Regards!

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

    Thank u soo much these tutorials really help me.. what happens if the admin forget the password plz include that functionality also in this project.

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

      This is a really simple system targeted for Beginners, So I kept it simple.
      But if you have completed all the tutorials and understood the concept, then you should try adding password reset feature.
      It's easy when you understand the logic.
      Best Wishes!

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

    Hello sir again. Great tutorial.
    in my login page my password is showing while I type it. It doesnt get stared(***). How can I fix it?

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

      Please check your form.
      You might have used input type text instead of password.
      If needed watch the tutorial once again and compare the code.
      It might help you to find the error and fix it.
      Best Wishes!

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

      @@VijayThapa thank you sir it worked

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

    you can Decentralize PHP admins

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

    Hello Sir My question that You said that there is no login access for users/customers ..then why u made a login page for admin if there is login page for admin obiviously it will show to the users then if there is login page how you will hide it from user because if user can see that login page he will confused because there is no registration page for him to register and then login...so how will you hide that page from user and show for only admin to access admin dashbord

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

      I have too this problem Please help solve this one

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

    Sir My CSS file didnot shown in webpage source when I'm going to refresh it from login.php. This admin.css is working greatly in manage admin page . But this same file didnot working in login.php . Is there anyone who can help me . Please !

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

      You need to add the link to css file at the top of login.php file.
      If needed, watch the tutorial once again and compare the code.
      It might help you to find the error and fix it.
      Thanks and Regards!

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

      @@VijayThapa Thank you Sir !

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

    Sir I have one problem in login page .. I put in right username or password but this also show login failed or username and pass wrong

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

      Then you might have error either on SQL query or getting the username and password values from form.
      Did you encrypt the password before passing in SQL Query?

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

      @@VijayThapa sir I already many time check it.. i encrypt pass also. But also show username and pass wrong

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

      @@VijayThapa didn't show any error sir

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

      @@omprakashmadkar2516 Then, I want you to watch the tutorial once again and compare the code.
      It might help you to find the error and fix it.
      Best Wishes!

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

      Do you solve this problem? Im having this also please help meee

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

    I tried as show you but while clicking on login with correct user details it doesn't go into if statement rather goes into else statment. Can you please help with this?

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

      Then you might have error either
      1. in your SQL query
      2. or you forget to encrypt the password while checking
      3. or while adding admin
      Please check these places.
      If needed, watch the tutorial once again and compare the code.
      It might help you to find the error and fix it.
      Best Wishes!

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

    Hello! Thanks for the video, very helpful! I have a question. What can i do without taking authentication out of the code if i forgot the admin password?

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

      You will have to add "Forgot Password" feature.
      For that you can
      1. Either generate random password, change it and send the new password via email
      2. Or generate a new link to reset password and send it via email. Use session for time limit to reset the password.
      Please research on the concept of Forgot Password and Reset Password.
      Best Wishes!

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

      in the login-check. php file use if( isset($_SESSOIN['user'])) instead of if(!isset($_SESSION['user']))

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

      @@VijayThapa great idea! Thanks! :)

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

    Hi sir when I browse the dash board its coming without login form.

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

      Please complete this (Authorization) part successfully.
      If needed watch the tutorial once again and compare the code.
      It might help you to find the error and fix it.
      Thanks and Regards!

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

    Hello sir thank you for those tutorials, i have a problem with this part, I can access all pages without login check (whenever i logout i can access pages), i failed to find where the problem is! can you help me?

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

      Please check your code.
      You might have missed something.
      If needed, watch the tutorial once again and compare the code.
      It might help you to find the error and fix it.
      Thanks and Regards!

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

    Your tutorial is amazing and holds lot of informations. Could you please share me these complete backend code for reference?

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

      Email me at hi@vijaythapa.com.
      Thank you so much for following the tutorials.

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

      @@VijayThapa sir i also sent you the email
      Please share with me too i need it urgent

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

    Please help me brother, I Am entering right credentials still it shows Please login to access Admin Panel 🥺😭

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

      Please check whether your password is encrypted or not while
      1. adding user
      2.updating user
      3. login check
      Thanks and Regards!

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

    Sir I have some errors in my code please help me 🙏🙏🙏
    I watched it thrice a day past 2 days
    Couldn't able to rectify my problem
    Please help me sir🙏🙏🙏🙏

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

      What's the error?
      Please email me at hi@vijaythapa.com with the screenshot of your error and code.
      Thanks and Regards!

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

    great tutorial but the sessions only work for me if I apply ob_start() at the beginning of the files, otherwise the sessions get mixed up.

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

      That's OK as long as you understand the SESSION concept.
      Read more about ob_start() from the link below
      www.vijaythapa.com.np/2021/08/how-to-fix-headers-already-sent-error.html
      Thanks and Regards!

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

    Sir, i have an error , when create after login page and type admin and password , then display "fater error, call to undefined function mysqli_num_row()." Please help solve this

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

    can you download everything you have done here?

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

    Please help me how to add users to login this system

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

      Please follow this course from the first episode.
      This is the 4th one.
      Best Wishes!

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

      @@VijayThapa Ok brother , User registration input password and username how can I do this step . This one only access admin

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

      @@luckymusic5505 User Registration is same as "Add Admin" and User Login is same as Admin Login.
      You just need to add "user_type" column on database to know admin or customer.

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

      @@VijayThapa Bro add to "user_type" column in to add admin table or create new table like user table and also create add user php and user login php . Is this correct

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

      @@luckymusic5505 Since all the properties of User and Admin are similar, why would you create different tables.
      Please learn more about Relational Databases and It's Properties.

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

    In login page if we dont see that successfully or failed after all the step I followed what is the solution of this

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

      Anyone have the solution for this

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

      You might have error in setting sessions.
      Please watch the tutorial once again and compare the code.
      It might help you to find the error and fix it.
      Thanks and Regards!

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

    Hi, Sir. When I logged in I kept on coming back to login.php saying "Please login to access Admin Panel." though my password and username are right.

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

      Then you might have some error in your code.
      Check your SQL Query, or password encryption or redirection.
      If needed, watch the tutorial once again and compare the code.
      It might help you to find the error and fix it.
      Best Wishes!

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

    Can we showcase this project in our resume...? Will it be impactful

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

      Yes, Sure.
      If possible upload your version on Github as well.
      Best Wishes!

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

    can i get the source code of this projct ..pls because i did an error in any of my page..i dont knw where to correct it ..

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

      Hi there, please email me at hi@vijaythapa.com

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

    In login.php, if($count==1) didnot work since we did not check for query execution i.e if($res==TRUE)..
    But when I did if($count==TRUE), it worked. and it worked in you for ($count==1).
    why is that so.

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

      I assumed that the query is executed successfully every time, so did not check $res==TRUE.
      And you must check $COUNT with numerical value not with boolean because $count returns numerical value not TRUE/FALSE.
      If $count==1 is not working, then you might have error in your query.
      Please don't use $count==TRUE.

  • @stick-o1913
    @stick-o1913 3 роки тому

    Apache/2.4.46 (Win64) OpenSSL/1.1.1h PHP/7.4.12 Server at localhost Port 80
    this error shows when I clicked the css in the view source.

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

      Then check your CSS link once.
      Is your XAMPP (Apache and MySQL) running fine?

    • @stick-o1913
      @stick-o1913 3 роки тому

      @@VijayThapa I resolved it already. Thaaanks . 🤗

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

      I got same error I don't know how to resolve can you please help 🥺

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

      @@VijayThapa please help sir

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

      @@akshitchandpara947 What's the error?
      Email me at hi@vijaythapa.com with the screenshot of your error and code.

  • @aasritha.r7600
    @aasritha.r7600 9 місяців тому

    Can anyone help in setting login page for customer

    • @VijayThapa
      @VijayThapa  9 місяців тому

      The design of this project doesn't need customer login.
      But in case you need it, Customer register is similar to "Add-Admin",
      and Customer Login is similar to "Admin Login".
      Best Wishes!

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

    Sir , my database data has vanished ...as my friend reinstalled xampp app again ..all my data in database has gone ..and now I am not able to login to my admin page ..pls help me out

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

      I tried inserting values in the database table ..but then also not able to access login through those values

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

      First Create or import Database, then
      Try doing one of the following
      1. Add admin manually on database but password must be encrypted with MD5
      2. Comment out "login-check.php" on menu.php and then go to "add-admin.php".
      And add the user and then remove comment from for login-check.
      Best Wishes!

  • @MikiAbrha-jg1lq
    @MikiAbrha-jg1lq 8 місяців тому

    please helep me ,the loigin-check is not workin to me

    • @VijayThapa
      @VijayThapa  8 місяців тому

      You may have error in your code (Check If-Else statement, sessions and redirections).
      If needed, watch the tutorial once again and compare the code.
      It might help you to find the error and fix it.
      Best Wishes!

  • @bacayolewisb.1393
    @bacayolewisb.1393 9 місяців тому

    there is no user log in for customer?

    • @VijayThapa
      @VijayThapa  9 місяців тому +1

      Only for Admin.
      Users can order food by submitting their email address and phone number.
      This project is for beginners so kept it simple so that they can understand all the logics.
      Thanks and Regards!

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

    does tjis project include triggers concept ?

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

      No it does not.
      If you want to learn about triggers, then I would like you to follow more advanced course like following
      ua-cam.com/video/Tvw1qSubn6U/v-deo.html
      Best Wishes!

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

    after writing the !isset, i cannot login, can someone help??

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

      Please check your if-else statement.
      If needed, watch the tutorial once again and compare the code.
      It might help you to find the error and fix it.
      Thanks and Regards!

  • @maithilishelke6528
    @maithilishelke6528 9 місяців тому

    I get an error in log in check file on SITEURL plzz help me i am stuck

    • @VijayThapa
      @VijayThapa  9 місяців тому

      Please email me at hi@vijaythapa.com with the screenshot of your error and code.
      Thanks and Regards!

  • @ng-makingmemories2039
    @ng-makingmemories2039 2 роки тому

    My every username and password which I'm passing ..... They are been displayed in the url ..... After localhost/admin.......... Please help sir

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

      Is your form method GET?
      Change it to POST.

    • @ng-makingmemories2039
      @ng-makingmemories2039 2 роки тому

      @@VijayThapa yes sir did that already resolved ..... Thank you so much 😊😊 please tell me how can I connect with you ?? Bcoz I'm making my college project refering this series so I might face prblm again in future

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

    Thank you sir you're awesome teacher and great tutorial series I recommend it specially beginners will learn a lot here do like, share, and subscribe...

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

    Sir, it said that I made too many redirections to index.php whenever I logged in to admin dashboard. My codes are correct too.

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

      You might have error in redirection code.
      Please check it once again.
      If needed, watch the tutorial and compare the code.
      It might help you to find the error and fix it.
      Best Wishess!

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

      @@VijayThapa okay sir thank you💛

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

      @@nini_ninya5488 You're welcome!

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

    after giving authorization ,then going to login ,then it cant login what i do

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

      You might have missed something.
      Please watch the tutorial once again and compare the code.
      It might help you to find the error and fix it.
      Best Wishes!

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

    My login page is not working nothing is displayed on clicking submit I'm on the page itself no error in fact please help

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

      Then you might have error in your redirection.
      Please check your code on redirecting the page.
      If needed, Watch the tutorial once again . It might help you to find the error and fix it.
      Best Wishes!

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

    I having a problem with the code. I have entered the correct username and password. but also warns that Please login to access Admin panel

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

      Did you encrypt the password while adding, updating user and while login?
      If needed, watch the tutorial once again and compare the code.
      It might help you to find the error and fix it.
      Thanks and Regards!

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

    my authorization part is not working however i repeat the same steps that you taught us in video

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

      Please watch the tutorial once again and compare the code.
      It might help you to find the error and fix it.

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

      Sure sir..thank you for your response

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

    Hi sir I'm getting redirected to login page whenever I enter correct username and password

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

      Do you get any other error messages?

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

    Sir, why i am getting a warning in mysqli_num_rows statement ?

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

      You might have error in your SQL query.
      What error message do you get?
      If needed, watch the tutorial once again and compare the code.
      It might help you to find the bug and fix it.
      Best Wishes!

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

      @@VijayThapa expects parameter 1 to be mysqli_result

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

      @@rosemaryjojo2545 ​ Check your SQL Query.
      And follow the instructions I told you earlier.

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

    Sir your tutorials is really good can you send the full source code with database please

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

      I'm really glad that you enjoyed the tutorials.
      Hope it's helpful to you.
      Please email me at hi@vijaythapa.com for the source code.
      Thanks and Regards!

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

      Hello sir
      Yes sir all tutorials are useful to me but my project submission date have been declared so i send you a mail regarding to project
      Thank you sir for helping me

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

      Sir can i get the source code for this project?

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

    I'm getting an error called too many redirects could you pls help me with this..

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

      You might have error in your redirections.

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

      @@VijayThapa Yes sir I got it! Thank you.

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

    Sir, after login with correct username and password it is redirecting to login page again. What's the error ?

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

      Do you get any error message?

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

      @@VijayThapa no

    • @ParthPatel-cs3pw
      @ParthPatel-cs3pw 3 роки тому +1

      ​@@akhilkhandelwal3927 same issue if u solved it let me know plzz

    • @ParthPatel-cs3pw
      @ParthPatel-cs3pw 3 роки тому

      hey remove md5(password) from add admin worked for me

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

      @@ParthPatel-cs3pw It's because, you did not encrypt password while checking username and password before login.
      I think you did not understand the concept of encryption.
      Best Wishes!

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

    Sir, I am making mini project. You have mande an admin panel but I'm still wondering In this project have you given option to log in and register user also?

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

      No, In this project user doesn't need to register/login.
      This project was for complete beginner, So made it simple to understand.
      But if you want to add register/login for user, then Register is same ass "Add Admin" and Login is same as "Admin Login".
      You can try it.
      Best Wishes!

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

      @@VijayThapa Thank you Sir for your words

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

      @@sanketmule9599 You're welcome Brother!

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

      Also if you think the tutorials has helped you and can help others as well, then please SHARE with your family and friends.
      It helps this channel to GROW and your loved ones also can learn Web Development for FREE.
      Thanks and Regards!

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

      @@VijayThapa sure bro!

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

    thanks a lot bro i am beginner i want to learn please guide to me

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

      If you're complete Beginner, Start with Web Design (HTML & CSS),
      1. Restaurant Website Design
      ua-cam.com/video/VaV_Ro8jpPY/v-deo.html
      2. Personal Portfolio Website Design
      ua-cam.com/video/Z2ALIr-0mgY/v-deo.html
      Then, PHP and MySQL
      1. Task Manager App
      ua-cam.com/video/1rl36zxqZZw/v-deo.html
      2. Food Order Website
      ua-cam.com/video/ZBgTzx46B8s/v-deo.html
      Best Wishes!

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

      @@VijayThapa please help me bro how to write contact form in php mysql database please guide to me . I got a lot of knowledge from your food order website tutorial but still left contact form please show me how write. Sir my english is not good please try to read me i hope u will understand my language

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

      @@zayarlwin9352 It's easy, you can follow the link below and try it
      www.tutorialspoint.com/php/php_sending_emails.htm
      Best Wishes!

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

    I have check many time it.. why show wrong username or pass .. so plese help me sir

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

      Then you might have error either on SQL query or getting the username and password values from form.
      Did you encrypt the password before passing in SQL Query?
      Please watch the tutorial once again and compare the code.
      It might help you to find the error and fix it.
      Best Wishes!

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

      @@VijayThapa sir.. how can I solve this problem tell me. Sir it's imp for me

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

      @@VijayThapa yes sir I was encrypted pass

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

      @@omprakashmadkar2516 having this issue..... kingly lemme know if you have solve it

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

    sir i cant log in can you pls tell me why?

  • @RityB-w6o
    @RityB-w6o Рік тому

    login successful but not connect with dashboard

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

      Check you redirection code after login successful.
      If needed, watch the tutorial once again and compare the code.
      It might help you to find the error and fix it.
      Best Wishes!

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

    I'm getting an error this page isn't working saying redirected many times

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

      Then you might have error in your redirection.
      Please check your code on redirecting the page.
      If needed, Watch the tutorial once again and compare the code . It might help you to find the error and fix it.
      Best Wishes!

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

    Sir i want forgot password button coding in this login authentication

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

      Thank you so much for following the tutorial and Hope you completed all the episodes.
      And if you've completed the tutorials, then why don't you try adding that feature by yourself.
      It helps you to develop self-learning and reasoning skills (must have skills on senior developers).
      I'll be adding such features on my new course for intermediate/advanced developers.
      Best Wishes!

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

    hello sir, what happens when someone forgets the password?

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

      Another admin will have to change the password.
      Also if you understand the concept of change password, you can try adding forget password feature as well.
      That'll be a test for you.
      Best Wishes!