I daily receive the same question from different people about having to pay $5 for the CSS file, so before asking here is my answer :) Yes you do need to be a Patreon supporter to download my lesson files INCLUDING the CSS file, and here are a few reasons why. 1: CSS should be easy for you to do at this point, therefore you should not need my CSS file. 2: This is not a CSS tutorial, and my subscribers even voted on me not including CSS in my videos because it took too long. 3: You are not supposed to "just copy" from this video, you are supposed to "learn and apply" to your own website. Therefore again, you shouldn't need my CSS. 4: People have already supported me on Patreon to get the CSS file, therefore I won't suddenly make it free to download. 5: Majority of my subscribers where the ones who pushed the idea of me using Patreon for my lesson files, and I have their full support in doing so. I keep getting comments where people either want to argue with me on why they should be getting my lesson material for free. I don't know if it is a lack of understanding that KZbinrs also need to pay their bills, or if they simply don't care as long as they get the material for free. But this is how I run my channel :)
@jimgerth68545 жыл бұрын
Totally agree and keep up the good stuff! Btw can you tell me what video you’re referring to at 4:36, the „PHP course before“?
@Dani_Krossing5 жыл бұрын
Hi Jim, here is the link for that video I mentioned :) kzbin.info/www/bejne/nH63p5xph96mY9E
@InfiniteThrees5 жыл бұрын
@@Dani_Krossing it's great to see that you're active in the comments :). Do you address the duplicate email problem in your forgot password script video?
@glennv.merkel30205 жыл бұрын
agree, programming is practicing also it is ur effort bro...however ur are the best i like ur videos :P
@NewtonCazzaro5 жыл бұрын
You are absolutely correct, don't even bother adding a CSS file this! You are amazing, thank you so much for this video. I really appreciate it and it really changed my life! Ps. To the people asking for the CSS stylesheet, give us a break... you are watching an advanced computer science video and asking this wizard for a CSS stylesheet? You guys should feel embarrassed of such a stupid complain.
@demliquids93815 жыл бұрын
shocked at how anyone can give out such a high quality work for free. this was wonderful
@Dani_Krossing5 жыл бұрын
Thanks :)
@bitmammothOG4 жыл бұрын
Patreon helps him a ton :) I support there, its definitely worth considering the contribution.
@techcanyon4114 жыл бұрын
@@bitmammothOG There was a time i signed up for Patreon for one month but i did not got what i am looking for;a complete login system.Patreon had many branches of payment rate and it pissed me off.
@bitmammothOG4 жыл бұрын
@@techcanyon411 thing is you are looking for a complete system not learning how to do it yourself. I think you might be better off searching something like Udemy for that sort of info. I do however advise against that out of my personal experience it leads to really old outdated systems. If you stop and think about what you see from each video you already learned way more than you can anywhere else for 5$ a month.
@bitmammothOG4 жыл бұрын
I once asked how I could do something Daniel already had explained and he clarified which videos to watch then I realized I actually already knew how to do what I was asking. I never had this problem again after that. You want full login system, I believe that is also posted in the current updates on the Patreon but you can always recreate it from the videos on youtube for free. Also for the record, I am not Danial I am Terry an actual supporter :)
@fluffyfetlocks6 жыл бұрын
Finally, someone posted a well crafted login system guide that actually explains something. Allot of guides out there say "copy paste this" and then it is difficult to to troubleshoot. They often dont work too as they are for php5
@whiteavem54385 жыл бұрын
yes!!! exactly
@alexandertrists39655 жыл бұрын
this IS difficult to troubleshoot! please see my comment to mmtuts $5 post.
@7Mirino5 жыл бұрын
Not only is his tutorial extremely informative and well laid-out, it's also ENTERTAINING to watch. I find it very difficult to sit for almost 2 hours straight just watching a video, but the way this is presented made those hours fly!
@GeorgeBrotherston4 жыл бұрын
I am relatively new to PHP, and found your courses via a KZbin search. These courses are the best I've seen and I wish to thank you for creating these! I just signed up for the $5/mo. Patreon, and expect to continue support for as long as I am learning through your system. I am interested in many of the topic areas you have available, with each having multiple videos broken down nicely by subtopic. I wish you success in your continued endeavors and look forward to exploring your content!
@imanechakri42904 жыл бұрын
can you send me the css code . i'm a student i don't have money for patreon :/
@benjaminibok80033 жыл бұрын
I just finished seeing the second php login system video, and I wrote out everything, I hope I can follow my scribbles without needing the video. Great work right here Danny, thanks so much...
@Brrrndy5 жыл бұрын
LMAOOOOOO! I TOOK 7 HOURS TO WRITE THE CODE AND FIGURE OUT WHY MY CODES WONT WORK. But thanks for this tutorial. Keep up the good work!
@Scobb4475 жыл бұрын
Hey, just wanted to point out a little error... At 1:47:44 You should have the following: else if (isset($_GET["signup"])) { echo "Success";} or else you'll get a error for signup being empty.... AWESOME GUIDE BTW
@Jamie-pb5tq5 жыл бұрын
changed that and still getting empty fields error
@uvebgns82245 жыл бұрын
thank you !!
@sed100014 жыл бұрын
Thanks a lot!
@newyorkonmusic84014 жыл бұрын
You can do this very easy and user friendly instead. Add this just below the code: else if ($_GET['signup'] == "new"){ echo 'Just fill in the fields.'; } And in your header.php change the signup a href link to Signup
@NoName-rs4th4 жыл бұрын
thank you man
@noumansyed59684 жыл бұрын
(00:00:00) Introduction (00:01:08) Technical info you need to know (00:03:45) What you need to have ready before we start (00:05:28) HTML & CSS markup (00:23:49) Setting up our database (00:29:59) Creating the PHP signup script (01:15:51) Creating the PHP login script (01:35:39) How to start a session on all website pages (01:36:37) How to change website content when logged in (01:41:10) Creating the PHP logout script (01:42:56) How to create error messages (01:48:42) If you got an error during this tutorial THIS IS AMAIZINGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG
@erissanorma58914 жыл бұрын
thanks for the link!
@g-shubham4 жыл бұрын
Thanks !!
@evan.59674 жыл бұрын
it's in the desc lmfao
@iconsworld92 жыл бұрын
nice paying maxiumum attention.
@saranghaeyo.carvz.2 жыл бұрын
Hi.. I'm a CS Student & I really learn a lot in your video tutorials.. It really help me in building our system for our school requirements.. We are so lucky to have someone like you who have all the passion in creating all this video lessons.. Its a very big help especially for us students.. Thank you so much for creating this superb channel.. Looking forward to more video tutorials of yours!
@victoriagn59344 жыл бұрын
mmtuts!!! honestly, you saved me from failing one of my programming classes, I was turning in empty docs because I honestly did not know how to do anything (its an online class and my professor only uploaded his lesson plan at the beginning of the semester lmao) thank you sosoosososo much, your lessons are the best!! REALLY THANK YOU. I'm becoming a patreon supporter now for sure:))
@oscarmartinlive4 жыл бұрын
This is by far the best PHP login system tutorial I've seen on KZbin. Thank you.
@ricardocosta56284 жыл бұрын
I know I'm not early, but you might just have saved my graduation's final project bro. That's a sub for sure.
@ruthogadina7573 жыл бұрын
same 😂
@thatminivan5 жыл бұрын
Your work and passion reflects on your videos and files carefully documented. I am now subscribed to your patreon, I feel like you putting the best in your work. It's amazing how good you explain every step. Exactly what I needed. I've been hunting for codes on github and random sites but this is so much more worth it than spending hours trying to understand on your own.
@afuwapedoyinsola8442 жыл бұрын
2022 AND THIS IS STILL THE GREATEST TUTOR / TUTORIAL OUT THERE FACED A NUMBER OF ERRORS MY SELF AND TOOK TIME TO FIX IT P.s for who it may concern make sure to create and else statement for an empty fieldset during user login LOVE From NIGERIA 🇳🇬❤
@Osuna20245 жыл бұрын
You are really good, man. Thank you very much. I took a full web development course in college and didn't learn half as much as I did with you in this video. Sure, anyone can make a simple video for logins but with ZERO cybersecurity or database creation. Again, thank you so much.
@SCHNEE6665 жыл бұрын
Wow, I actually learned more from this tutorial than in the past semester at my university :D Thank you!
@besz21894 жыл бұрын
haha same here :D
@mounir1016 жыл бұрын
Your voice is great and very clear.
@0596sami5 жыл бұрын
As always
@amasnur794 жыл бұрын
Thank you for this terrific tutorial. Yours has the best coding practice compared to other tutorial videos I have viewed. However, there is a flaw that I detected: 1:47:25 You did not check if signup is set. As a result, if you access the signup page from index.php (when there are no other error tags in the url), you will get error "Undefined index: signup". My workaround is to do if (isset($_GET['signup'])) first, then check if it is equal to "success".
@tp57234 жыл бұрын
This is the only little error i recognized, too. I solved it by adding: else if (empty($_GET)) { # code... } just before else if ($_GET['signup'] == "success") { echo ' Signup successfull'; }
@learningenglishisfun14704 жыл бұрын
That's correct! thanks
@khuramshahzad90892 жыл бұрын
At 40.22 to check if the input field is emp1ty u can go in html code and inp1ut tag and write required before closing that tag. It is that simple we dont need that php condition . The video is one of the best on this lesson.♥️
@Dani_Krossing2 жыл бұрын
If you watch the updated video, I explain why you shouldn’t do that. 🙂 HTML is not safe to use. You can VERY easily just remove the “required” attribute using the browsers build in dev tool. The same goes for any other front end (JavaScript for example), never use it for security. ALWAYS use backend like PHP for security. So no it isn’t as simple as that. 🙂
@khuramshahzad90892 жыл бұрын
@@Dani_Krossing 😱 U r right Thanks. ♥️
@jonathanX014 жыл бұрын
At 1:39:39, when you mention that a lot of people asked how do you change content whenever you are logged in or not, I think they mean like profile pictures, bio, and user pages. At 1:40:55 or so, you were doing it the longer way but you can split the php code and block the entire html code so you don't have to put it in an echo, which works because I have done it many, many times.
@sipofbruno66114 жыл бұрын
For those worrying about the CSS stylesheet, I had no idea how to use CSS so I paused the video, and watched “CSS Crash Course for Absolute Beginners” and a day later I managed to create the same exact design used in this video. Wasn’t that hard.
@imanechakri42904 жыл бұрын
can you send me the css code . i'm a student i don't have money for patreon :/
@camilabooth73974 жыл бұрын
18:09 stopped the video to css the crap out of my php page! Thanks for the lesson!
@farhadboy6294 жыл бұрын
This guy will make me an entrepreneur
@lepystudio89744 жыл бұрын
Coder maybe
@jorgetonos4 жыл бұрын
Bro, I don't think there is an actual word to show my gratitud to you, all current word on the dictionary don't define why I feel right now, so I just will say THANK YOU in caps. I mean, this is, FOR SURE, the best php login tutorial for beginners EVER. Man, you don't just explain with details what is what you're doing, why you're doing it and what the code is for but as well you make sure you're following the latest security measurements out there. I mean, this is just too much, again THANK YOU for your effort in making these videos, the community appreciates it. You have a spot in heaven already my fellow.
@mohibqureshi3914 жыл бұрын
man....I just can't stop watching you...i mean... your teaching style is unique ...i like it...
@maddragonfurs63583 жыл бұрын
You just saved me from certain doom, i thank you and will name my first born in your honour
@absterexe5 жыл бұрын
Thanks mmtuts ! GET THIS GUY A MILLION OF SUBS.
@JimfromIndy6 жыл бұрын
I need to point out that you have allowed multiple users to use the same email address. When you fetch the user upon signin, you assume there is only one. You could easily end up with users having multiple usernames with the same email address, and not knowing which user you selected.
@Dani_Krossing6 жыл бұрын
You are right that is something to look out for. I didn't want to go over a whole lot of error handlers in this episode otherwise the already long video would get even longer, however you are right that this is a factor when we allow users to log in using an email as well. The login system doesn't "break" per se, however when the user logs in they will only log in as the first user in the database with that e-mail. The other users with the same e-mail are just going to get ignored. I'm gonna go ahead and include this in the description of the video and I will pin your comment as well :)
@brantedselnemiada49566 жыл бұрын
I also wonder that would happen, thanks for commenting it out. Btw, I'm done fixing it for those who wants the code: //Check if the email already exist $sql = "SELECT * FROM users WHERE user_email='$email'"; $result = mysqli_query($conn, $sql); $resultCheck = mysqli_num_rows($result); if ($resultCheck > 0) { header("Location: ../signup.php?signup=emailexist"); exit();
@syahmiahmad21665 жыл бұрын
i was about to point that out . you beat me to it .
@angelshallom67815 жыл бұрын
@@brantedselnemiada4956 where should this code be placed?
@brantedselnemiada49565 жыл бұрын
@@angelshallom6781 at your signup.inc.php file add that code to your error handlers, dont forget to put it inside of an else statement like this: else { //Check if the email already exist $sql = "SELECT * FROM users WHERE user_email='$email'"; $result = mysqli_query($connection, $sql); $resultCheck = mysqli_num_rows($result); if ($resultCheck > 0) { header("Location: ../signup.php?signup=emailexist&first=$first&last=$last&uid=$uid"); exit(); }
@haakonenoksen93832 жыл бұрын
Extremely good lessons. I suggest to do all the error checking at once and send the whole result back for the user to correct. The way it is now set up, the user has to correct one mistake at a time. Let's say he made an error in all entries. He is sent back and forth 6-7 times and finally get the message that the user is already registered. He forgot that he registered 2 years ago. Also I think there is no point sending back the pwd when they don't match. You don't know if the error is in the first or the repeat password. Or, send them both back and the user can have a button to press to show the passwords.
@christopher75404 жыл бұрын
thank you man i'm a complete beginner to php but you made the whole process very easy to follow and understand very useful and still relevant in 2020. thank you
@didierdelay66235 жыл бұрын
Hi, Your video is really impressive. You manage to clearly explain a quite sensitive subject. That'a great. There is one thing that could actually be confusing for some people. Right at the beginning of the video (around 02:20), You specify using mysqli which is not mysql, and mysqli is the new improved version replacing the older mysql obsolete for quite a while now. This is totally true and very important to mention such thing as thy re still out there many documentations based on mysql. However, the way you say it could be confusing for some people. It could actually be understood as MySQL (the database server) is obsolete, when the mysql library (or extension) is the outdated stuff. Never the less, I think you have done a great job at publishing this video, clear, instructive, inspirering. Quite long, but justified, and that's definitely not a problem when user can pause as often as needed. Thank you very much
@cobrassasino5 жыл бұрын
good explanation. I just wandering why he uses mysqli instead PDO. I know PDO is very common, I though is behind Laravel, Wordpress etc...
@cobrassasino5 жыл бұрын
I anwser myself. I found this on : "websitebeaver.com/php-pdo-vs-mysqli". "My opinion is that PDO should be used by default, especially beginners, due to its versatility, general predictability and useful fetch modes. However, MySQLi would be a better choice for advanced users who want the newest"
@hasanajami76536 жыл бұрын
1h, 49min, 36s It's a Challenge... [ACCEPTED] Btw. you're the best:)
@gosavva16 жыл бұрын
Wow, a new login system video that is why I love you and love your videos, you always update your videos .. now I will start watching, thank you from now because I know it will be very helpful.
@NoxaDreshar4 жыл бұрын
Hey mmtuts, fellow coder veteran here. I just stepped over your video and was quite surprised by the quality and detail of this tutorial. You put in a lot of work, information and also error handling for the user which is quite not usual these days, especially for free. My kudos to you. Keep up the good work.
@alexalmu91914 жыл бұрын
In case you get success, but no data in your database, please make sure you are using php 7.0. I used nucserv for localhost and did not work, then I installed xampp and it was working(local) and finally, I have upgraded the php version from my panel and I have got data in my database. (also online).Thnak you for the video! Great work!
@poorboy24005 жыл бұрын
this tutorial was extremely helpful, thank you for your efforts good man and i hope you upload the tutorial on the user page soon!!!!
@hersonbalisi40754 жыл бұрын
hey! Im kinda new to programming here, very thankful I've found your tutorials! I admire your patience and energy putting everything in words just to explain php to somebody like me, lol.. keep it up!! I will be waiting for your new tuts! btw, got a questuin though, I've watched this video twice, and I dont think you kinda run an error check if the same EMAIL already exists in the database, or i just missed it? PS: i dont really get the concept of that "prepared statement" thing haha! thanks!
@tailboat4 жыл бұрын
This is true he doesn't, but it can be easily done by adding the OR operator in the SQL query created at 53:26 He shows how to add the AND operator while creating this (55:16), just switch that out for the OR and check the email. You would have something that looks similar to this: "SELECT uid FROM users WHERE uid=? OR email=?"
@angelrico6406 жыл бұрын
Thank you for all the help. You have teach me more than college's teacher. xD Kidding, but definitely a big help in my projects.
@LayKxD4 жыл бұрын
I wish I could like this video 5,000 times I have to learn PHP and SQL basically in half a semester, and this dude is the real deal.
@sumdev4983 Жыл бұрын
How can anyone complain about paying 5 bucks for access to the files? Your content is amazing and because of content providers like you, I have a new career that pays well and I'm about to start my own business. I can't thank you enough for all your hard work.
@Wakssbm5 жыл бұрын
I can't thank you enough for this tutorial! Well made, well explained, I had no question!
@bankoleemmanuel10886 жыл бұрын
Wow... My mentor. You re-upload this again!!! 🙌🙌🙌😉
@revanslacey4 жыл бұрын
27:58 Just looked up SQL text types. TINYTEXT has a maximum of 255 characters. LONGTEXT has a maximum of 4,294,967,295 characters. Should be enough for a reasonably secure password!
@loosabway34004 жыл бұрын
Amusing...
@akachi16374 жыл бұрын
That is 4gb of password!!!!!
@haziqsontkraken12464 жыл бұрын
how long password did you use? sure, hashing uses a lot of space, but 4GB is kinda overkill
@gonefishing2006 Жыл бұрын
Well I'm back watching this one (again). Moved my pages to a new machine and for some reason some of them don't work like they did and I don't like what they look like so refresher course time. Wish you still did PHP videos like you did back in the day.
@joelnjoroge72023 жыл бұрын
Finally after many trials I have done it! Thank you very much Krossing for this. ...I kept getting this sql error only to realize I had put the query before the connection. so the query wasn't getting executed as there was no connection to the database. Guys make sure you order things correctly on line 17 of login.inc.php (referring to Krossing's file).
@tommmmmer4 жыл бұрын
FIX: Like many many comments here there is an issue when you signup. signup.inc.php signup.php?error=sqlerror This means the validation checked out but as soon as SQL comes into play it fails. I've tested the DB connection, tested that I can insert from PHP, tested that I can insert on the database. Check these lines are just like this: $stmt = mysqli_stmt_init($conn); if (!mysqli_stmt_prepare($stmt, $sql)) I think in the video he modifies this at one point nad for me I had one entry of ""mysqli_stmt_init" and the other "mysqli_init
@alexzil21424 жыл бұрын
I'm not understanding this I'm having an "object not found error 404" and at the same time I'm seeing the "sign up.php? error=sqlerror" on my header I'm very confused and frustrated
@tr0uge9625 жыл бұрын
mmtuts = "The styling doesn't have any impact on how to login system works" me = " nav{display:none;} "
@revwhyte5 жыл бұрын
You're not wrong XD
@karmanetworkit67874 жыл бұрын
ahahaahahhahah
@teacuptea91554 жыл бұрын
Why did I find this funny lol
@Haider-ol7jr4 жыл бұрын
Tr0uge what a 5 head move haahaha
@someoneontheinternetuvenev62684 жыл бұрын
Lol dude
@paulgarcia28875 жыл бұрын
Are you going to create a video on a user profile? I'm trying to figure out how to make it so that when a user logs in information about their account balance shows up.
@cristidumitrescu5574 жыл бұрын
BIG LIKE. if someone gets stuck at the if statements in index.php, be patient until you create the logout file, because that helps unset the variables in the session and allows the if statements to work correctly.
@a.yashwanth4 жыл бұрын
Use header>nav>(a>img)+ul>(li>a)*4 for 9:05 if you have emmet.
@tysonhamada65275 жыл бұрын
Thanks man awesome tutorial nice teaching style better than my uni teachers
@Dani_Krossing6 жыл бұрын
Hi everyone! Yes this is a re-upload of an older tutorial :) The older version of this video had quite a lot of things I wanted to change both in terms of PHP structure and security. Therefore I have made this new updated version which is a bit longer, but I promise it is worth the watch. ENJOY! :)
@der42332286 жыл бұрын
Thank you very much. Well done.
@alphagaming19956 жыл бұрын
Please make a video on Forget password in php
@yasmeentahir58426 жыл бұрын
Thankyou Very much
@BarnabyPerrinAldous6 жыл бұрын
This upload is a major coincidence for me. I followed the old video and then I decided to view the series from scratch. Today I got to episode on hashing and dehashing data and today you upload this. Very handy for me, thanks Daniel!
@DR9Productions6 жыл бұрын
Hi mmtuts. First of all, I just wanted to let you know that I have learned a lot by watching your video tutorials! The way you explain things are really easy to understand!! I am also, trully very thankful to you for the amount of time you spend making this fantastic videos and sharing with so many of us your knowledge. I have watched a lot of tutorials about making login systems, but the thing that is more difficult to find and is probably one of the biggest concerns for the must of us is the security of the system. There are so many threats online, like sql injections, hacking sessions and so many more that the must of us are not even aware off. So, what I am trying to say is... how can the must of us protect our login and management systems from all this threats? If you were to make a high security system for a login and admin system, how would you do it? Would you create a php file like security.php with all the security classes and functions inside it and called them when needed?! Would that be a easy way to update future security features?! Would you create and generate automatic tokens to prevent sessions hacking? Once again, thank you very much for sharing your knowledge with us!
@austingriner27735 жыл бұрын
Add this to to automatically fill it in after returning from the error page, if it had been filled in already: value="" You can do the same with your other text fields as well, only needing to change the "name" part.
@HarshdeepSingh-iz6gr5 жыл бұрын
Just what i was about to write... Good to see someone else is paying attention!!! He didn't actually cover this part!!!😄😄😅
@timanderson57174 жыл бұрын
Why not use That way you're not repeating the name. Also it's shorter. Although, either way you might open yourself up to XSS attacks if someone goes to page.php?name=%3Cscript%20src="evil.com/bad.js/"%3E
@Jansa3724 жыл бұрын
I'm sorry but I didn't quite get it. So do i have to write that in the html input?
@BanDrag0n4 жыл бұрын
how can I do the same thing for the login box? I want it to refill the username if the password was wrong
@majidnafarabad73114 жыл бұрын
I returned back to web design after 5 years and this video really helped me recall many items. Thank you so much, it was very clear and helpful.
@anonntsc52223 жыл бұрын
Your explanation is much better than my lesson at school . Although I don't really understand all, because language problem. Thank you!
@georgelopez93564 жыл бұрын
Hi mmtuts, I believe you're totally right about charging for your files, what is $5, $20 or even $50 for such a good work!. People prefers to spend $500 at Disneyland rather than pay for something that will help them prosper. If I where you I'd not listen to this people and use my focus and energy to develop more quality curses like this one! Thank you!
@fling29855 жыл бұрын
When I click the signup button after I wrote in all the correct information it takes me to signup.php?error=sqlerror instead of showing success. I've checked through the code for errors or wrong spellings and I've gone through everything in your code multiple times. I cant find a way to fix this...
@justdaidalos9855 жыл бұрын
Same. Anyone solved that?
@lightyagami36504 жыл бұрын
No. I'm also trying to figure out what's wrong. I did everthing exactly like him
@lightyagami36504 жыл бұрын
Just solved it. I made the mistake to write "!mysqli_stmt_prepare($conn, $sql)" and "mysqli_bind_param(...)". But insted I should have written "!mysqli_stmt_prepare($stmt, $sql)" and "mysqli_stmt_bind_param(...)". Hope that will help you!
@per1sher4 жыл бұрын
This is excellent - thank you for posting. I'll remember you when I float my facebook killer website...
@androidmod1832 жыл бұрын
Just watched all previous lessons and i figured out that there's an updated version for this current video, well i guess i will pass on this one and go to the new one :) Thank you for your content
@NanoStudio94 жыл бұрын
It amazes me that you've provided such high quality work for FREE. This was my first attempt at learning PHP and succeeded. Thank you everything you've done!
@Orincaby5 жыл бұрын
The "i" in MySQLi means "i'm the newer version so you have to use me"
@privateger4 жыл бұрын
Don't use it. Use PDO.
@OmnivorousOtter1014 жыл бұрын
dontquestionmyactions, why?
@privateger4 жыл бұрын
@@OmnivorousOtter101 Because mysqli has been replaced by it. PDO is way easier to use, universal across many database systems and more secure. The MySQLi functions currently only exist for compatibility reasons.
@williamalesna57034 жыл бұрын
lol xD
@LuBre4 жыл бұрын
Nope, you should use PDO instead.
@jakobkmar5 жыл бұрын
Such a great tutorial! So detailed and mentiones everything you need to know.
@sebastian9935 жыл бұрын
where was this 15 years ago when we had to do it as part of an assignment lol..
@arzfiring33314 жыл бұрын
Thank god it's atleast available now, so that I can do my assignments 🙃🙃
@parthip9983 жыл бұрын
@@arzfiring3331 Same 😁
@Maths4Everyone4 жыл бұрын
This is so clearly explained. I was dreading creating a login system, but after just a few hours I had one... a couple of hours later I had one which was fully customised for me. Thank you.
@googleaccount-n3d Жыл бұрын
just a suggestion , in order for us to know when this video is taken its best to show the time stamp on windows in bottom right corner ;) helps a lot to know when its done and to see if there are any updates from the program that you are teachen. thanks ! big fan !
@nhoviepante76444 жыл бұрын
Its not working with me it is showing the sqlerror.
@karlkarlson16064 жыл бұрын
I am having the same issue and have rewritten it, did you ever figure out why?
@karlkarlson16064 жыл бұрын
I just figured mine out it was a typo in my name of uidUsers
@mrdark39035 жыл бұрын
no matter what i do i always get this massage: Fill in all fields!. in the signup page. I have done exactly same as you, and i dont know where the problem lies
@randomTVSWE4 жыл бұрын
did you solve it?
@flaasher6 жыл бұрын
Plz make a tutorial with example on how to build a project with MVC and dealing with DB
@nmrisrl116 жыл бұрын
Ali Saleh Good suggestion.
@calebngugi2 жыл бұрын
Superb video 👌, although I'd like to mention that naming a php with a .inc is a serious vulnerability. If the webserver is not told to run a .inc page as a php file i.e. for e.g. if someone deletes the .php at the end of the filename on the URL, then it'll run as text. And if you have sensitive info like name and password of your database... Thanks for the video, I've learned awesome new stuff 😀
@davidsmith-ws4bz4 жыл бұрын
Very helpful video. Anyone new to MySQL finding themselves locked out, might try right click on the XAMPP icon, and click on (run as administrator). This helped heaps when i was learning, and kept getting locked out.
@arthemyvandalovski15044 жыл бұрын
I get the error message empty fields even thought i filled all the fields
@N-.-A4 жыл бұрын
Arthemy I had the same but figured it out. It's because isset will only return 0/1 true/false. You dont want that, you want the string of the variable 'error'. So instead of isset($_GET['error']) just do: $_GET['error'] Now you got the string to check with and not a bool.
@vahidor15404 жыл бұрын
hi i see this error when login: Fatal error: Uncaught Error: Call to undefined function mysqli_stmt_get_result()
@crumbae12484 жыл бұрын
You Should Keep $stmt Inside TheBrackets Of mysqli_stmt_get_result()
@logireloco1234 жыл бұрын
or $stmt->get_result();
@jayjassi50084 жыл бұрын
where the password is verified in the login script, when run on the page, it outputs wrong password in the url despite it being correct (not logging in)
@migjeniljazi54164 жыл бұрын
yeah im having the same problem as well
@aliadilovic22944 жыл бұрын
try make if(row['pwdUsers']==$password){ ...}, instead of password_verify part, it worked for me
@Kenny-ft9gd4 жыл бұрын
@@aliadilovic2294 $pwdCheck = ($row['pwdUser'] == $password); like this?
@sexychick98504 жыл бұрын
Did you ever fix it?
@jacobmackay35434 жыл бұрын
I had set the user passwords max value to 50, in the database, but because of the hashing, it makes it longer than 50 so would throw this error. I changed the value length in the phpmyadmin and it worked
@diahooh4 жыл бұрын
2 years late but thank you so much Dani, this was the best tutorial I've seen.
@DCG_423 жыл бұрын
I need to learn php really fast so this was a good dive into php, this was basically a simple fullstack thank you. This language is very powerful and contains so many useful things for web dev.
@samueliaconelli69434 жыл бұрын
damn, i forgot the i of mysqli. Dont repeat my same error:(
@partians5 жыл бұрын
when I try to login it says success however it still shows You are logged out, the same code that you showed is used.
@wyanido5 жыл бұрын
I'm having the same issue
@wyanido5 жыл бұрын
Hi again, I found a solution to this problem. It worked for me and I hope it will for you as well. In each of your pages at the top where it says require header.php, make sure that the block of php is right at the top of your code with no blank spaces before it. Place it even above
@partians5 жыл бұрын
@@wyanido Hey, glad you have that issue fixed. My fix was the userid names for the session.
@Some_Techie5 жыл бұрын
@@partians hello parTians, could you please go into detail on how you found that fix? I'm a newbie and I'm having this problem. Thanks.
@Karaamjeet5 жыл бұрын
@@Some_Techie same with me
@photon27245 жыл бұрын
its a great experience getting taught by a young elon musk
@reistophmilkayr32155 жыл бұрын
Yeah, dats why I kinda remember the face
@markedwards37803 жыл бұрын
Dani, I think that your lessons are superb and I really don't mind if I have to pay a small fee for dowloading any material you make available. I am learning so much from your lessons, and you have a natural ability to explain complicated concepts in a way that beginners can easily understand. Keep up the good work.
@blakestevenson31984 жыл бұрын
First off, your videos are very helpful. I did run into one problem on this video with my php recognizing the hashed password in my database. In your video you wrote that $pwdCheck = password_verify($password),$row['password']); However, whenever i used the correct password it always showed as false, and showed the error (localhost/index.php?error=wrongpwd) After hours of looking for defects in my code (because I am a newbie) I figured out that I would have to hash the submitted password prior to searching the database. I made a very small adjustment and it worked. $pwdCheck = password_verify(password_hash($password),$row['password']); Thanks for all of your help.
@shawngrant94882 ай бұрын
YES THIS! Thank you so muchhhh! 😭Also, slight modification: instead of '$pwdCheck = password_verify(password_hash($password),$row['password']);', use ' $pwdCheck = password_verify($password, password_hash($row['pwdUsers'], PASSWORD_DEFAULT)); ' why? First reason is that in order to match the password, we have to unhash the password in the pwdUsers column of the database, not the user's input from the password field on the login page. Second, is that password_hash requires two arguments, not one, so you first need to specify the db password you want to hash, and then you need to specify the second argument as PASSWORD_DEFAULT. I don't know why we use PASSWORD_DEFAULT as the second argument, but from reading around and watching other Krossing php tutorials, this is the typical way to hash passwords.
@shawngrant94882 ай бұрын
now my only issue left to resolve is to figure out why it doesn't render the "You are logged in!" response specified in the header.php file, even after the ' $_SESSION['userId'] = $row['idUsers']; ' line in the login.inc.php file sets it to the user's column ID value.
@shawngrant94882 ай бұрын
Nevermind, I just figured it out in less than two minutes haha. Apaprently, I had a typo in that line of code. ' $_SESSION['userId'] = $row['idUsers'] ' should have actually been ' $_SESSION['userId'] = $row['idusers'] ' with the 'u' in lowercase. Why? Because the corresponding column id in my users table is titled 'idusers' not 'idUsers'. Sheesh typos suck!
@shawngrant94882 ай бұрын
Hollyyyyy F**k the whole thing actually works now! Much thanks so much @blakestevenson3198!!! And much thanks @Dani_Krossing!!!!
@michaltymburski85285 жыл бұрын
When you say word " SO!" very often it hears like your using it like If statement inside if inside if inside if :D which i guess helps to understand those if statements :)
@intechmarketing63844 жыл бұрын
For people having issues with the user errors at the end of the video. Use this code:
@sutaschramm31955 жыл бұрын
It feels good after all of that, when you save the page and it works with no errors. 😀
@frankkaundamukhuni4 ай бұрын
You are right professor Dan you can't just be giving all that information free.
@marcinmaj36096 жыл бұрын
Great! Now please remember me, forgot password, csrf Security and protected 3 login attemps.
@renestve70175 жыл бұрын
Use cookies and sessions for "Remember me" and "login attempts"
@HarshdeepSingh-iz6gr5 жыл бұрын
well it isn't as easy as u'r making it look... php with cookies need to be learned... u can't do it on ur own.. Daniel's got a video for it. go check it out... It shows u how to create a forgot password system From there u might get some idea to make "remember me" feature.
@ckjones15 жыл бұрын
Fatal error: Uncaught Error: Call to undefined function mysqli_stmt_get_result() in C:\MAMP\htdocs\Proyecto\includes\login-inc.php:25 Stack trace: #0 {main} thrown in C:\MAMP\htdocs\Proyecto\includes\login-inc.php on line 25
@ArtGateVR5 жыл бұрын
Anyone figure this out? I'm getting the same error.
@MaximumTino5 жыл бұрын
I'm having this issue too, please help
@MaximumTino5 жыл бұрын
My exact error comes up as Fatal error: Uncaught Error: Call to undefined function msqli_fetch_assoc() in C:\xampp\htdocs oot\HighFrequency.online\includes\login.inc.php:28 Stack trace: #0 {main} thrown in C:\xampp\htdocs oot\HighFrequency.online\includes\login.inc.php on line 28
@likemenotlikeyou5 жыл бұрын
I'm getting the same error as well
@inventustries8875 жыл бұрын
@@MaximumTino you forgot the y in msqli_fetch_assoc() it needs to be mysqli_fetch_assoc()
@stevenvanhulle72424 жыл бұрын
3:15 "this going to be a long video." Me, noticing the nearly 2 hours playing time: "O.M.G!"
@tokka23644 жыл бұрын
Thanks man, I'm a 15 year old programmer and this was really easy for me to understand. I had an assignment and this made my life so much easier thank you
@magisChannel4 жыл бұрын
I love how you try to cover as many security issues as possible, but i think its important that you should point out, that you didnt secure your databasehandler in any way. So this system isnt secure at all. Of course you would secure the file on an actual system differently, but i think its a nice to know for beginner.
@devlinpaddock43634 жыл бұрын
Hey just wanted you to know ^
@Raveloy5 жыл бұрын
i have a little problem and i dont know if it is just me whenever i try to login it always gives me the error "wrongpwd" no matter if it is the correct password can somebody help me? thank you
@Allizzify5 жыл бұрын
i have the same problem... did you figure it out yet?
@Allizzify5 жыл бұрын
i'm thinking it has something to do with the hashing of the pw
@calvinloh_ls5 жыл бұрын
I'm having the same problem too, anyone managed to solve it? EDIT: SOLVED! What I did previously was I inserted the user id and pwd straight into mySQL without creating any signup form as shown by mmtuts. Just follow what he do and signup an account, try again then you're done.
@ramseybeing5 жыл бұрын
me too
@ramseybeing5 жыл бұрын
It could be that i cannot access localhost/phpmyadmin i have to enter my ip 192.168.64.2/phpmyadmin in order to enter. Any one the same?
@delowarhossain45234 жыл бұрын
"error=sqlerror" how to fix?
@luphoria4 жыл бұрын
It could be many things, for me I had accidentally named my variable the wrong thing once.
@karlkarlson16064 жыл бұрын
same issue for me did you figure it out?
@karlkarlson16064 жыл бұрын
I just figured mine out it was a typo in my name of uidUsers
@delowarhossain45234 жыл бұрын
@@karlkarlson1606 yes.. I figured it out.
@delowarhossain45234 жыл бұрын
Can you please help me about php rest api crud??
@bowiemtl4 жыл бұрын
I'm so glad that I was right about using sessions for my own attempt at a login system. My entire system was insecure and I knew it was but atleast I got one part of it right. Thanks for this tutorial!
@yuriyarin40273 жыл бұрын
Fantastic tutorial. The best part is that you explain every part in detail which is essential for those of us who are learning. One issue, I'm kinda wondering about. Now there's a require feature in HTML fields, which means that fields can't be sent empty. So what that means is basically that means that the if statement checking if the fields are empty, is redundant, isn't it? I'm just starting out now. Was this not available back in the day?
@Dani_Krossing3 жыл бұрын
No it’s the other way around. The “required” attribute is not useful since it can VERY easily be bypassed using the browsers build-in developer tool. Front-end should never be used for security. Always do it through a back-end language.
@dragoscrx4045 жыл бұрын
My feedback: You write too much code and you never stop to test each step that you do.
@devmashup37004 жыл бұрын
At 54:01, at his line 16 I have a 'unexpected semicolon' even thou he has one.
@unchartify4 жыл бұрын
did you manage to fix this? having the same error
@samuellee833 жыл бұрын
@@unchartify same : (
@gonefishing20063 жыл бұрын
@@samuellee83 I didn't get in trouble until line 51 when I forgot to put one in.
@noobiebro72665 жыл бұрын
lord please make me rich... I want to support his patreon :(
@techcanyon4114 жыл бұрын
I think you might pray that lord should give you the ideas to be rich.
@charliesmith83094 жыл бұрын
man thank you so much. I haven't touched any other coding language other than html, css or java and I was able to get a pretty basic understanding of php just from this video, and everything worked perfectly. this was a straight up lifesaver. keep it up !! :]
@bwf10464 жыл бұрын
Clear, simple, concise... just an amazing tutorial. These are the highest quality programming videos on KZbin.