User And Admin Login System In PHP MySQL Step By Step | PHP Tutorial For Beginners (2023)

  Рет қаралды 229,694

Web Tech Knowledge

Web Tech Knowledge

Күн бұрын

Пікірлер: 172
@WebTechKnowledge
@WebTechKnowledge 3 жыл бұрын
The source Code : login.php
@WebTechKnowledge
@WebTechKnowledge 3 жыл бұрын
Sub ?
@Hiekejsjsiejn
@Hiekejsjsiejn 3 жыл бұрын
Php don't wrk for me yy....😣
@WebTechKnowledge
@WebTechKnowledge 3 жыл бұрын
What’s your error?
@serifarisha2538
@serifarisha2538 3 жыл бұрын
can this coding use in visual studio code ?
@WebTechKnowledge
@WebTechKnowledge 3 жыл бұрын
Yes
@saloni.4443
@saloni.4443 Жыл бұрын
spent the entire day looking through countless videos to create a login system to no avail. So glad that I found your video! I was able finish the whole thing from scratch within 30 mins. :)
@ibunoribunor
@ibunoribunor Жыл бұрын
Hi can you teach me too ?
@darikamukhim3262
@darikamukhim3262 9 ай бұрын
Great tutorial!🙌🏼
@kenilgsja3891
@kenilgsja3891 2 жыл бұрын
sir everything is easy to understand i like this video it is in full detail
@henryeffiom7610
@henryeffiom7610 4 ай бұрын
I love this so educative
@shafka9611
@shafka9611 9 ай бұрын
thanks for you help dear brother
@JunieVM
@JunieVM 10 ай бұрын
Thanks bhai, this is our prelim.
@TinJ92
@TinJ92 2 жыл бұрын
Thank you for sharing your knowledge.
@markjohntominio9430
@markjohntominio9430 2 ай бұрын
Very helpful, thank you❤
@Simplaz1234
@Simplaz1234 Ай бұрын
Thank you Sir.
@joganidarshil1314
@joganidarshil1314 Жыл бұрын
this short video tutorial was really helpful. Thank you.
@justbeing2662
@justbeing2662 2 жыл бұрын
You have taught me alot than my teachers😍😍 thank you so much
@Xiaoharuko
@Xiaoharuko 3 жыл бұрын
Thank you Sir! Just what i was looking for to work with as a base template in creating my login portal.
@Gihan10
@Gihan10 2 жыл бұрын
Patta machan
@usermira438
@usermira438 Жыл бұрын
thank you so much sir
@jamesmut3117
@jamesmut3117 2 жыл бұрын
This is excellent. I have been looking for something of this kind
@ismzaxxon
@ismzaxxon 10 ай бұрын
Great base model for testing. Thank you for your time. I did try the student user first, but some files such as css are missing.
@heythere_696
@heythere_696 3 жыл бұрын
perfect it work 👍👌....
@HybridThunder
@HybridThunder 2 жыл бұрын
thank you so much saved my life, liked!
@cruchcherry_
@cruchcherry_ 3 жыл бұрын
This was of great help .Thank you
@sandeeps8646
@sandeeps8646 2 ай бұрын
thanks
@teamnorteth4065
@teamnorteth4065 2 жыл бұрын
Thank you very much my friend its work
@eddiebrempong1143
@eddiebrempong1143 3 жыл бұрын
Great job, i like it so much and you made it very simple.
@meetamanhar3
@meetamanhar3 2 жыл бұрын
thank your sir this video very helpful 🙏🙏
@gamingcm8805
@gamingcm8805 2 жыл бұрын
goood
@user-zi1xk4qv7u
@user-zi1xk4qv7u 3 жыл бұрын
Awesome very straight forward and good Thanks so much it was really helpful
@samssams1064
@samssams1064 3 жыл бұрын
excellent
@MrTonyTv
@MrTonyTv Жыл бұрын
men it was good tutorial but if i login as a user and i type the admin homepae url i can go in
@WebTechKnowledge
@WebTechKnowledge Жыл бұрын
Give a if condition, if the usertype is user in admin homepage then send the user to the user homepage location
@MrTonyTv
@MrTonyTv Жыл бұрын
@@WebTechKnowledge Bro can u write quick the code?
@darthlinox
@darthlinox 2 жыл бұрын
Incrível!!! Professor parabéns!
@evernjoshua8100
@evernjoshua8100 3 жыл бұрын
thank you so muchhhhhh
@balkan77forum66
@balkan77forum66 3 жыл бұрын
thanks u bro i maked awsome project !!!
@SILVER-fy6lx
@SILVER-fy6lx Жыл бұрын
hi i want to ask can i change my html file to php file? since i need to connect to my login.php / register.php and can i made other than user and admin to specific admin email and user email ?
@dineshdevarapalli6433
@dineshdevarapalli6433 Жыл бұрын
Thank you so much bro❤
@roshnigaikwad7554
@roshnigaikwad7554 15 күн бұрын
Once i have login home page with logout option it displays the user name but without logouting the page i went to the admin page there it displays the admin page information without asking to login why and it has same user name which was displayed in home page after login
@mihirrana8070
@mihirrana8070 2 жыл бұрын
bhai helpfullll
@harvey8695
@harvey8695 2 жыл бұрын
Since you are only checking to see if the username session variable is set, once you login as a regular user, you can then type the URL for the admin home page and gain access.
@123210sam
@123210sam Жыл бұрын
wats the solution to that vulnerability
@molyamolya1617
@molyamolya1617 3 жыл бұрын
Thank you, you’ve been very helpful
@justbeing2662
@justbeing2662 2 жыл бұрын
If its not too much trouble, please do an online crime reporting system, where the police is the admin
@bishaws6377
@bishaws6377 2 жыл бұрын
this is really helpful!
@EricAstarcom
@EricAstarcom 3 жыл бұрын
Thanks so much. Please do you have crud tutorial on php and mysqli like the laravel tutorial you have already created. It will be appreciated if you could implement the crud tutorial using php. It will get you more subscribers because your tutorial is the best on youtube.
@WebTechKnowledge
@WebTechKnowledge 3 жыл бұрын
Ok i will make tutorial on it in 3 days
@EricAstarcom
@EricAstarcom 3 жыл бұрын
Look forward to crud tutorial in php and mysqli or pdo in the future. Thanks so much for the reply.
@Jenny-no7wi
@Jenny-no7wi 3 жыл бұрын
Thank you very much! Keep up the great work!
@palakparmar4720
@palakparmar4720 3 жыл бұрын
Thank you sir
@baadshahcults8224
@baadshahcults8224 2 жыл бұрын
Thank you sooo much🙏🙏
@user_noway
@user_noway Жыл бұрын
can this is be a back door for a website for a admin? is this how we create backdoor for a website?
@manuelgalvarez5312
@manuelgalvarez5312 3 жыл бұрын
Great job, i like it so much!!
@roopa5760
@roopa5760 2 жыл бұрын
sir , how to control access for login both user,admin based on time, ex: after 6 user not allowed to login , kindly requesting to provide me solution
@AdaNnenna-es1bz
@AdaNnenna-es1bz Жыл бұрын
Thank you for this but please, when I login in, I don't see the username displayed And when I add the Access denied code for non logged in users, even a registered account is redirected to the login page
@zoldyck9356
@zoldyck9356 Жыл бұрын
is it the same for android studio app?
@richardrodgers7406
@richardrodgers7406 3 жыл бұрын
I found a serious issue with his tutorial. Regular users can access the admin area using the url. How can we restrict that area to admin users only ?
@bamideleadedamola4309
@bamideleadedamola4309 2 жыл бұрын
Oh my! It's true , I just checked my it out ...... please is there a fix for this issue ???
@WebTechKnowledge
@WebTechKnowledge 2 жыл бұрын
Yes there is.. Send the usertype using session just like you send the name. Like this - $_SESSION['usertype']="user"; Then in the userhome write a else if condition Like this - elseif($_SESSION['usertype']="admin") { header("location:login.php"); } You have to do the same for adminhome Hope you are clear.
@zoldyck9356
@zoldyck9356 Жыл бұрын
can we use the same php code and relate it with android studio app please help
@luqmanqader9251
@luqmanqader9251 Жыл бұрын
Many Thanks
@makeunlimitedever9278
@makeunlimitedever9278 3 жыл бұрын
Thanks for this 🤗
@mecyber6316
@mecyber6316 2 жыл бұрын
is it okay to make a new table for admins only? or have to be with users to specify the role? thank you for the video.
@WebTechKnowledge
@WebTechKnowledge 2 жыл бұрын
Its fine to create different table for user and admin..but why you want to create a separate table for admin. Probably you will have a few admin data . so creating a different table is unnecessary. It's better to keep the number of table as minimum as possible. So it depends on your decision.
@govindangovind1013
@govindangovind1013 3 жыл бұрын
Thank you so much Sir
@nicholastolores861
@nicholastolores861 Жыл бұрын
Can I ask what tools or software I need for programming
@RahulKumar-xl3dd
@RahulKumar-xl3dd 2 жыл бұрын
If we use html , javascript and css for front end then will it work ???
@WebTechKnowledge
@WebTechKnowledge 2 жыл бұрын
Yes it will work
@drmustafamahmod
@drmustafamahmod 2 жыл бұрын
hello how i can change user to be an admin from backend ?? i know i must make a register page and all data go to database can i know how i make some user be admin not from change his statues from phpmyadmin
@WebTechKnowledge
@WebTechKnowledge 2 жыл бұрын
For adding admin you need to store usertype as 1 from the code. What you can do is that you need to make form in admin dashboard for user table. While inserting data to the table you need to insert usertype as 1 by default in controller.
@aniketsingh1976
@aniketsingh1976 2 жыл бұрын
Thanks * infinity
@charllotegracesarzuelo2015
@charllotegracesarzuelo2015 3 жыл бұрын
Thank that so helpful. But there is one problem I encounter why is it after logging in I couldn't enter to homepage, is it because of my database? Thank you.
@WebTechKnowledge
@WebTechKnowledge 3 жыл бұрын
Did you create the table in the database?
@gohxuanyou5381
@gohxuanyou5381 3 жыл бұрын
Hi sir, may I know, if i have 3 or more roles to add, what shall i do?
@WebTechKnowledge
@WebTechKnowledge 3 жыл бұрын
Same process. In this tutorial we use 0 for user 1 for admin Let's say you have another user_type which is manager then consider, 2 for manager
@bamideleadedamola4309
@bamideleadedamola4309 2 жыл бұрын
Please is there a way I can write a select all query based on the user type Something like " select * from table where usertype = admin " Thanks!
@ronnelmacompas1647
@ronnelmacompas1647 2 жыл бұрын
Thank you so much!
@discere5811
@discere5811 2 жыл бұрын
I encounter a problem around the 21:42, I keep getting the error Warning: Trying to access array offset on value of type null I have tried every solution I see on the internet but nothing worked, I hope you can reply even though the video is 1 year old, and to anyone who encountered this error and were able to solve it, can you kindly reply what solution you have done? Thank you in advance.
@shiellamay6862
@shiellamay6862 2 жыл бұрын
same problem, have u solve the issue?
@athirah__471
@athirah__471 Жыл бұрын
Can u tell me how can i change the name of the user_type bcs i have done it but the error keeps coming
@roycehortaleza272
@roycehortaleza272 2 жыл бұрын
Thank you!
@andrewilson3722
@andrewilson3722 5 ай бұрын
When I was testing the error message for username or password incorrect. I'm getting: Warning: Trying to access array offset on value of type null in D:\secure\project\index.php on line 20 Warning: Trying to access array offset on value of type null in D:\secure\project\index.php on line 23 Username or password incorrect. How do I fixed this without showing the warning
@killansinyangwe-wg4wv
@killansinyangwe-wg4wv Жыл бұрын
Please kindly help on how i can login to admin password from a database
@cabusorangelica_ict12-2a4
@cabusorangelica_ict12-2a4 2 жыл бұрын
can you teach us how to make attendance app for student plsss🙏🙏
@sathishkumarvaradharajan7110
@sathishkumarvaradharajan7110 3 жыл бұрын
when user logged in it goes to specific landing php page..but when user change the url to admin.php its opening ..who to authencate the page with usertype before loading
@WebTechKnowledge
@WebTechKnowledge 3 жыл бұрын
Checkout this tutorial. Then your issue will be solved. Here i make it a little detailed. Check around at the end. kzbin.info/www/bejne/aF7LYYOnrslmf9E
@mecyber6316
@mecyber6316 2 жыл бұрын
I got this warning "Warning: Trying to access array offset on value of type null" with admin account only, what happening? and what should i do? thank you
@mecyber6316
@mecyber6316 2 жыл бұрын
I figured it out this morning, this is because the admin password is encrypted in the database. I decrypted it and all codes worked fine.
@KidaneTeshager
@KidaneTeshager Жыл бұрын
How we create online exam web with admin and user page
@jackieBarnesjaylob
@jackieBarnesjaylob 3 жыл бұрын
can this be used in vscode instead of sublime?
@WebTechKnowledge
@WebTechKnowledge 3 жыл бұрын
Yes. Of course
@jackieBarnesjaylob
@jackieBarnesjaylob 3 жыл бұрын
Thank you
@edwinteoh3342
@edwinteoh3342 3 жыл бұрын
I found this error : "Notice: Trying to access array offset on value of type null" The line is if($row["Usertype"]=="User") & if($row["Usertype"]=="Admin")
@badonggamingtv1810
@badonggamingtv1810 3 жыл бұрын
Same with me, did you tried to access it?
@hijaujahat7500
@hijaujahat7500 2 жыл бұрын
@@badonggamingtv1810 u need to change $db (in login.php) name same as u database name
@jonasbauer4807
@jonasbauer4807 3 жыл бұрын
Ok thank you now it is working. But when I enter the passwort incorrect . This warning appears: Trying to access array offset on value of type null in C:\xampp\htdocs\login1\authenticate.php on line 40 i think because the array is empty. How can I catch the error that it only shows username or passwort incorrect?
@WebTechKnowledge
@WebTechKnowledge 3 жыл бұрын
You can use validation. Just search it on youtube. You will get it
@LindaKeshie-bg9pq
@LindaKeshie-bg9pq Жыл бұрын
Can I have this same one done in notepad
@user-zi1xk4qv7u
@user-zi1xk4qv7u 3 жыл бұрын
It passes an error if you input wrong username and password instead of it to return or echo wrong username or password
@mysticalstardust
@mysticalstardust 3 жыл бұрын
I really liked how each line was explained thoroughly! Subscribed :)
@kenyanmemes767
@kenyanmemes767 2 жыл бұрын
Hello, how do I get my xammp port to work, it says port 3306 has been occupied
@WebTechKnowledge
@WebTechKnowledge 2 жыл бұрын
You need to change the xampp port number
@kenyanmemes767
@kenyanmemes767 2 жыл бұрын
@@WebTechKnowledge do you know how?
@teamnorteth4065
@teamnorteth4065 2 жыл бұрын
Can i request sir ...can you please make an municipal library system sir thank you and godbless
@mevoalex7777
@mevoalex7777 3 жыл бұрын
cool.🦔❤️
@SOUF1YAN
@SOUF1YAN 3 жыл бұрын
thank u sm
@PriyaRani-cy3pu
@PriyaRani-cy3pu 2 жыл бұрын
An error in this...... That was... Trying to access array offset on value of type null... Plz give solution
@duke6477
@duke6477 2 жыл бұрын
This helps me so much sir, but I'm having a problem on the "else" wherein if you input a wrong password or user it should state that it's incorrect but mine says error but it still output the incorrect Warning: Trying to access array offset on value of type null in D:\xampp\htdocs\login\account.php on line 31 username or password incorrect
@zhennan1591
@zhennan1591 Жыл бұрын
Im having the same issue, have u managed to solve it?
@laughingkettle
@laughingkettle Жыл бұрын
Hello, if you have managed to solve this, can u tell us? TIA
@mahdihossaintanvir350
@mahdihossaintanvir350 3 жыл бұрын
when I try with wrong name or password, the code runs well but it shows me two error also...
@WebTechKnowledge
@WebTechKnowledge 3 жыл бұрын
Whats the error?
@Runetherune
@Runetherune 3 ай бұрын
I got this error: Fatal error: Uncaught mysqli_sql_exception: The server requested authentication method unknown to the client [auth_gssapi_client] in C:\xampp\htdocs\project\login.php:8 Stack trace: #0 C:\xampp\htdocs\project\login.php(8): mysqli_connect('localhost', 'root', Object(SensitiveParameterValue), 'user') #1 {main} thrown in C:\xampp\htdocs\project\login.php on line 8
@onlinengineer
@onlinengineer 3 жыл бұрын
I have the same wallpaper bro 👍
@WebTechKnowledge
@WebTechKnowledge 3 жыл бұрын
👌
@tiangong4712
@tiangong4712 3 жыл бұрын
Hi, your tutotial is very helpful, but i don't know why my page when i click login, is show me(Fatal error: Uncaught TypeError: mysqli_fetch_array(): Argument #1 ($result) must be of type mysqli_result, bool given in D:\Xampp\Xampp\htdocs\Delivery(final)\login\login.php:29 Stack trace: #0 D:\Xampp\Xampp\htdocs\Delivery(final)\login\login.php(29): mysqli_fetch_array(false) #1 {main} thrown in D:\Xampp\Xampp\htdocs\Delivery(final)\login\login.php on line 29), can you help to solve this?
@Carlos-jp2eh
@Carlos-jp2eh 2 жыл бұрын
where you are running mysqli_query , add 'or die( mysqli_error($db)' e.g $sql = "SELECT * FROM users"; $result = mysqli_query($db, $sql) or die( mysqli_error($db));
@patilkomal5638
@patilkomal5638 3 жыл бұрын
My page is not redirecting to userhome and no error as be seen ..can you resolve it soon!
@WebTechKnowledge
@WebTechKnowledge 3 жыл бұрын
I have given the source code in the 1st comment. Try that out
@jacklythgoe1478
@jacklythgoe1478 3 жыл бұрын
Parse error: syntax error, unexpected '$password' (T_VARIABLE), expecting ')' in C:\xampp\htdocs\Project\login.php on line 9
@yrajasekhar9134
@yrajasekhar9134 2 жыл бұрын
getting this error Uncaught TypeError: mysqli_num_rows(): Argument #1
@arevev
@arevev 3 жыл бұрын
tyyy
@Mohammedzahir001
@Mohammedzahir001 3 жыл бұрын
please someone tell me includ= session_start???
@manjuthenga4387
@manjuthenga4387 2 жыл бұрын
hai, any one can be login as user or admin
@harisyyyyy
@harisyyyyy 3 жыл бұрын
Undefined index error in POST Method $username=$_POST["username"]; $password=$_POST["password"]; how resolve this ???
@hathanehrukhandriv8638
@hathanehrukhandriv8638 2 жыл бұрын
add hw to select data from database
@jonasbauer4807
@jonasbauer4807 3 жыл бұрын
Hi, I get this erro: Uncaught TypeError: mysqli_error(): Argument #1 ($mysql) must be of type mysqli
@WebTechKnowledge
@WebTechKnowledge 3 жыл бұрын
Probably there is some spelling or syntax mistake.. Check your code
@WebTechKnowledge
@WebTechKnowledge 3 жыл бұрын
Here is a link which you can also check stackoverflow.com/questions/66837160/i-keep-having-uncaught-typeerror-mysqli-error-argument-1-mysql-must-be-o
@chelseamissi5331
@chelseamissi5331 3 жыл бұрын
Mine is not redirecting to userhome. It says not found
@WebTechKnowledge
@WebTechKnowledge 3 жыл бұрын
Check your code properly. Probably there is some spelling mistake
@o.k.S...65
@o.k.S...65 Жыл бұрын
Why i got this error ?? Warning: Trying to access array offset on value of type null in C:\xampp\htdocs\SIP23PROJECT\User.php on line 25 Warning: Trying to access array offset on value of type null in C:\xampp\htdocs\SIP23PROJECT\User.php on line 30 username or password incorrect
@bautistadalisaymilenem.4722
@bautistadalisaymilenem.4722 3 жыл бұрын
Warning: mysqli_connect(): (HY000/1049): Unknown database 'user' in C:\xampp\htdocs\login\login.php on line 11 connection error how to fix? The code was correct but still it looks like that.
@WebTechKnowledge
@WebTechKnowledge 3 жыл бұрын
Did you create the user table in the database?
@bautistadalisaymilenem.4722
@bautistadalisaymilenem.4722 3 жыл бұрын
@@WebTechKnowledge Yes po
@bautistadalisaymilenem.4722
@bautistadalisaymilenem.4722 3 жыл бұрын
i followed your steps
@WebTechKnowledge
@WebTechKnowledge 3 жыл бұрын
@@bautistadalisaymilenem.4722 1st solution : Check if the database name is exactly like in your code . 2nd solution : Check my.ini file of mysql and verify port number. Im most of the cases it runs on 3306 however if it is running on 3308 then edit your connection file: $conn = mysqli_connect($server_name, $mysql_username, $mysql_password, $db_name, "3308");
@bautistadalisaymilenem.4722
@bautistadalisaymilenem.4722 3 жыл бұрын
I just read your reply. I already fixed it yesterday. Thank you so much for the response. Also, with your video, it helps me a lot. ❤️
@franzmclay
@franzmclay Жыл бұрын
elseif($row["usertype"]=="admin") { $_SESSION["username"]=$username; header("location:adminhome.php"); } PLEASE HELP ME, IM ERROR with that line it gives this warning "Warning: Trying to access array offset on value of type null"
Their Boat Engine Fell Off
0:13
Newsflare
Рет қаралды 15 МЛН
Signup and Login with PHP and MySQL
43:16
Dave Hollingworth
Рет қаралды 293 М.
How to Make Multi User Login System in PHP | PHP E-Commerce Project Tutorial
33:19
Database Indexing for Dumb Developers
15:59
Laith Academy
Рет қаралды 80 М.
Use PHP Session to Display the Username on Header after Login
16:48
Вся база SQL для начинающих за 1 час
1:19:48
Vlad Mishustin
Рет қаралды 353 М.
Login and logout in php using session in hindi
30:10
Nilesh Dadheech
Рет қаралды 25 М.
Login and Registration Form in PHP and MySQL
56:17
AUZ Tutorials
Рет қаралды 355 М.