Please continue this series! It has helped me tremendously to fundamentally understand PHPOOP at my new job! Looking forward to it! You are very much appreciated 🙏
I saw your comment on my last video, so I just want to point out that it is not only PHP, but web dev and game dev in general that I will focus on. I am a "multimedia channel" and not a "PHP channel" after all. 🙂
The timing of this video really could not have been any luckier for me. I literally came across your videos for the first time yesterday, and they've been a great help with my assignment. Damn
As someone pointed out in the comments, using rowCount() to check how many results we get when we query the database, isn't a method that work in all database types. Instead you should use count() after you returned the data. SO INSTEAD OF: if($stmt->rowCount() == 0) { $stmt = null; header("location: profile.php?error=profilenotfound"); exit(); } $profileData = $stmt->fetchAll(PDO::FETCH_ASSOC); return $profileData; IT SHOULD BE: $profileData = $stmt->fetchAll(PDO::FETCH_ASSOC); if(count($profileData) == 0) { $stmt = null; header("location: profile.php?error=profilenotfound"); exit(); } return $profileData;
Oh, I missed that hint on your video to the login system so please ignore my comment ther *shame* I'm actually going through your tuts chronological. I'm your biggest fan! Just took me too long to find you 🙂
Your PHP video series had a big impact on my developer career and I still have good times to see your new videos regarding to web developer topic. Keep it up Dani and thanks for everything!
I have been waiting for this video for over a year when I first stumbled on how build your login system. I so much appreciate this as it has kicked started my idea on what I need to do for my website. I am trying to refrain from using WP as too many modules colide with one another and cause functions on the my website to not allow a user to get in contact with me. This blew it for me, so I wanted to create my own. So this is why I am here! Thank you so much for this much needed content. I will continue to support your parton page, soon in a very big way. This information is extremely valuable to me!! You rock brother, KEEP Em' Coming!
man everything you teach here is so smooth like i watched many oop tutorials on php but i never got that much from them. Your tutorials are easy to understand and on point the fact that you put very well in practice php oop is awesome this way i know at least a way how should i design things and move them from procedural php to oop php.
Brilliant! Thanks for another great tutorial on php, great to have you back doing php tuts again. I am starting to get the hang of OOP and PDO thanks to you, a very good tutorial creator and presenter.
I really liked your last php episodes before this one. They are so clear and understandble and this viideo also super. Thanks for the work. Please if you contunue doing php tuts I'm really excited to watch you do one on php MVC "Model Veiw Controller" and would be greatly apreciated.
Wow just wanted to write a quick thank you for great tutorial! Actually your OOP login system tutorial was explained so well, that I managed to finish this one before watching the rest of the video to check if I did it correctly :)
Dani your OOP tutorials are one of the best if not the best. Thank you for your contribution 🙏 Hope to see Symfony tutorials if you were ever engaged into this framework
Dani, you are my hero when it comes to software dev. Thank you so much and Happy New 2023 Year! Thanks for your energy and for sharing! You are on my list best tutors when it comes to software development.
This is a good tutorial, but the rowCount() method returns the number of rows affected in an update or insert query, but not necessarily the number of rows returned in a select query. Depending on the instance and the php/server configuration it sometimes will work the way you are trying with a select query, but it is not reliable. You could use the fetchAll() method and run count() on your result, in this case.
thank you so much for the video... already finished the first video on oop php login system... i just started last august on self learning on how to be a programmer... have not create anything yet... lol! can you give an advice for us self learners? please! i always write down everything is this good or not?
Bro. I just started with PHP OOP Concept last year following your guides and now I have improved by building project like mobile wallet. But now my structures are not well fine. I want to have a correct autoloader with Namespaces/Use. Please you can refer me to a link. Thanks 🙏🙏
Would it be better to put models, views and controllers into separate folders? And if so, do we need to put an includes of whatever folder a class needs to extend to?
@32:13 You start creating your first IF stmt execute fails, but you send the user header to "profiles.php..." Should this be "../profiles.php" as it is in the parent folder? This error check remains unused in your video because you haven't made any mistakes, so I'm just checking whether it would work if there was a mistake.
Love the vids man! I am encountering an error when logged in and then clicking on my profile an error shows that the page isn’t working at the moment and with the error statement consists of “profile not found”
Great Video. I have a question about accessing the users profile page if you are not logged in When i log out, the session is canceled, and the profile page becomes unavailable. How can I make viewing the profile page available to all users at any time? I feel like I am missing something simple.
Hi, Your videos so amazing and your teaching so good. I have done all your steps of login system and user profile page but i have one problem that i cant see any of my users_id from users table into profiles table instead of i getting error message of this "profile.php?error=profilenotfound" after create new account. Can you please help me.
The ID column in the profiles table says NULL, but everything else works fine! Could the issue be inside the setProfileInfo()? I don't know where to start troubleshooting...
Procedural and OOP are just to different ways of doing things. There is no "right or wrong". You need to look at "which is the better tool for the job". In my opinion, OOP is better when you start creating something like a login system or a profile page system, since it gets to the complexity level where OOP is more beneficial. 🙂 Don't be scared of getting into OOP. because you WILL need to learn it to become a PHP developer. 🙂 Only use Procedural if you have a good reason to, and not because you feel uncomfortable with OOP.
@@Dani_Krossing Until finding your channel I did not only feel uncomfortable by programming OOP (I did roughly understand how to) - I learned about it in other programming languages C, C#,VB) I was not able to figure out, why this should be beneficiary. Although I handled with quite large own programmed projects (80 Modules, 3 Databases) I often programmed simultaneously in procedural and OOP and always when I needed to debug I felt it was easier to follow what happened in procedural. But now I am coming close to understand the benefits. I still would say that at the end procedural is shorter and therefore the resulting program is smaller and maybe even slightly faster. I would really enjoy to get in contact with you just to discuss some points (not only programming) as I feel you are a great and interesting person with a great way to transfer thoughts into words. At my age (I'm 46) I appreciate to get to know people and have interesting and rewarding discussions/chats about the world and his brother 🙂 Best Christian
When I followed the login system and then this one, everything works except my session will not start and it seems like the session variables aren’t being set. Do you know what could be causing this? If I put “session_start()” in each page, it gives a warning about it being done multiple times, but when I resolve that, it’s not showing the info that it should be when logged in. Edit: I figured it out lol
It's pretty beginner level. It's meant as a exercise to help new people get the grasp of PHP, not to create a production ready system. For that you would typically be using a framework, and not try to hardcode it yourself.
How can I connect a login system to a shopping cart system for example in user-00 logged in and put any in the shopping cart and logged out then logged in again but as the same time if user-02 logged in will not see the things in the user-00 cart
hi... good day... im ralph... i have a to many redirect problem when i click the users name near the logout... what did i do wrong... i am self learner too...
Hello I watched all the tutorials for building a subscribe and loggin system with profile page -i implemented it in my projects everything works so far, users are susbscribed in the database the profile page is created but when subscribing i dont get to the profile page i always get the error: profilenotfound. Can anyone help me with that problem?
Hello Dani, i have copied through the code, watched the video twice to check for any errors i made. But when i try and load the page through Xampp localhost, the browser tells me that "localhost redirected you too many times" Is there any fix to this? This only started occurring after i created the profile system. Both the Login/Signup OOP tutorial and Forgot Password Tutorial worked but this one didn't. Thanks in advance!
This content is for educational purposes. If you plan to create a live website, you should create it using a framework, like Laravel, which has build in security. This video here isn’t secure enough, and is only meant to teach the concept of login systems.
@@Dani_Krossing I already know how to secure the database to prevent hackers by using the ? Sign in the database field I can also use visual studio code with php extension instead of using any other php framework. I just wanted to use some of your code on my project is this okay? Or no?
Hi Dani! Thank you so much for another amazing tutorial!🙏 I'm almost finished with the profile page, but ran into a problem regarding to the log in system... I can only log in with an email or only with a username, depending on in which order I type the names assigned to my collums inside the db for the uid and email. So if I type this, I can only log in with a username: $stmt= $this->connect()->prepare('SELECT pwdUser FROM users WHERE uidUser = ? OR emailUser = ?;'); If I change it to this I can only log in with an email: $stmt= $this->connect()->prepare('SELECT pwdUser FROM users WHERE emailUser = ? OR uidUser = ?;'); How can I fix this so I can log in with both?
The pinned comment I made should solve that for you hopefully. 🙂 Another user wrote me about this yesterday, so my guess is that there were updates made to which databases can use the rowCount() PHP method. You should use count() instead. Again the pinned comment has the "fixed" code in it. Out of curiosity, which database type do you use? Is it MySQL?
@@Dani_Krossing Yeah I saw that pinned comment and I tried, I'm still just trying a bunch of things... I even found another way to swap the email and uid so one of them works... but I won't give up until I can use both haha Yeah, I think phpMyAdmin is MySQL?
Ah... The other person who had the same error pointed out that I made 2 typos, which are the reason why you are getting the error. 😬 I included it at the top of the pinned comment of the Login System video. Hope you get it working!
🥳🥳🥳 I messed around for another hour or so and finally reminded myself about that taking a break usually results in the answer revealing itself to me when I get back to the code... Didn't expect it to be in another comment of you haha, thank you so much, again!🤗
any one know whats going on here? CREATE TABLE PROFILES ( profiles_id int NOT NULL AUTO_INCREMENT, profiles_about TEXT NOT NULL, profiles_introtitle TEXT NOT NULL, profiles_introtext TEXT NOT NULL, users_id int, PRIMARY KEY (profiles_id), FOREIGN KEY (users_id) REFERENCES users(users_id) ); (errno: 150 "Foreign key constraint is incorrectly formed")
I really like Dani's style and I always jump up for a LaOla when there comes: "With that said" - Jiiiihhaaa!! No upfront @noviccen388 but for efficient learning book a teacher. For me this works much better as I learn better when having fun and my teacher is so "real" instead of being an allknowing robot. And indeed I usually watch a video more than one time to fully learn about the core theme. Maybe it's because I'm slow but hey, it works for me!
I need your help in a php code I can’t find it any were in the internet so if you can send your instagram or any way to contact you, you can even do a TH-cam video about it ,hope you reply…
eventually you back to PHP , we need more PHP bro, you're are amazing at explaining such topics
Please continue this series! It has helped me tremendously to fundamentally understand PHPOOP at my new job! Looking forward to it! You are very much appreciated 🙏
Hallelujah!!!!
He finally shifted his attention to php😭😭😭
I saw your comment on my last video, so I just want to point out that it is not only PHP, but web dev and game dev in general that I will focus on. I am a "multimedia channel" and not a "PHP channel" after all. 🙂
The timing of this video really could not have been any luckier for me. I literally came across your videos for the first time yesterday, and they've been a great help with my assignment. Damn
As someone pointed out in the comments, using rowCount() to check how many results we get when we query the database, isn't a method that work in all database types. Instead you should use count() after you returned the data.
SO INSTEAD OF:
if($stmt->rowCount() == 0) {
$stmt = null;
header("location: profile.php?error=profilenotfound");
exit();
}
$profileData = $stmt->fetchAll(PDO::FETCH_ASSOC);
return $profileData;
IT SHOULD BE:
$profileData = $stmt->fetchAll(PDO::FETCH_ASSOC);
if(count($profileData) == 0) {
$stmt = null;
header("location: profile.php?error=profilenotfound");
exit();
}
return $profileData;
Oh, I missed that hint on your video to the login system so please ignore my comment ther *shame* I'm actually going through your tuts chronological. I'm your biggest fan! Just took me too long to find you 🙂
The ultimate best php course ever seen, can't stop watching this guy ❤
Your PHP video series had a big impact on my developer career and I still have good times to see your new videos regarding to web developer topic. Keep it up Dani and thanks for everything!
I have been waiting for this video for over a year when I first stumbled on how build your login system. I so much appreciate this as it has kicked started my idea on what I need to do for my website. I am trying to refrain from using WP as too many modules colide with one another and cause functions on the my website to not allow a user to get in contact with me. This blew it for me, so I wanted to create my own. So this is why I am here! Thank you so much for this much needed content. I will continue to support your parton page, soon in a very big way. This information is extremely valuable to me!! You rock brother, KEEP Em' Coming!
man everything you teach here is so smooth like i watched many oop tutorials on php but i never got that much from them. Your tutorials are easy to understand and on point the fact that you put very well in practice php oop is awesome this way i know at least a way how should i design things and move them from procedural php to oop php.
Glad I could help! 😊
Thank you so much dani!!, casually I was going to start the php OOP series and you upload this video 🙏🙏
Hope you find it useful :)
I'm planning to go back to college and your PHP tutorials are great refreshers! Thanks for doing what you do!
Good to have you back as teacher of PHP. I loved your way of explaining and love it again. Thanks.
Happy to see You Again working with PHP! ☑️
Brilliant! Thanks for another great tutorial on php, great to have you back doing php tuts again. I am starting to get the hang of OOP and PDO thanks to you, a very good tutorial creator and presenter.
Daniel, thank you. I'm sure a video like this took a lot of time and thought. You helped me quite a bit.
I currently needs this.
Thanks man
My mentor, please continue to help us, you are doing really great.
I really liked your last php episodes before this one. They are so clear and understandble and this viideo also super. Thanks for the work. Please if you contunue doing php tuts I'm really excited to watch you do one on php MVC "Model Veiw Controller" and would be greatly apreciated.
Wow just wanted to write a quick thank you for great tutorial! Actually your OOP login system tutorial was explained so well, that I managed to finish this one before watching the rest of the video to check if I did it correctly :)
Extremely high quality content for free? thanks for providing these helpful tutorials and please do a Q&A!!!!
Perfect! Done and done. I hope you keep going with this project. Would love to learn OOP PHP on 'How to upload profile images to users' etc.
I love this series thank you so much for this sir. I hope I will see more videos like this. and I hope you do series for Laravel PHP
Can you pls do a video about how to connect your login page to the shopping cart with order history?
Krossing, i love your initial hair style, like your channel profile. its neat
Great stuff Dani, a great Tutor.
Dani your OOP tutorials are one of the best if not the best. Thank you for your contribution 🙏 Hope to see Symfony tutorials if you were ever engaged into this framework
Dani, you are my hero when it comes to software dev. Thank you so much and Happy New 2023 Year! Thanks for your energy and for sharing! You are on my list best tutors when it comes to software development.
Following, thank you Dani.
This is a good tutorial, but the rowCount() method returns the number of rows affected in an update or insert query, but not necessarily the number of rows returned in a select query. Depending on the instance and the php/server configuration it sometimes will work the way you are trying with a select query, but it is not reliable. You could use the fetchAll() method and run count() on your result, in this case.
Yes you are completely right. 🙂 Thanks for letting me know.
Made a pinned comment with the correction.
great content dude. love your vids
Thanks! 😊 Glad you enjoy it!
Really appreciate your videos!!!
thank you so much for the video... already finished the first video on oop php login system...
i just started last august on self learning on how to be a programmer...
have not create anything yet... lol! can you give an advice for us self learners? please!
i always write down everything is this good or not?
Create some CMS mini project bro. You are amazing I learn a lot of your videos. Keep it up
Bro. I just started with PHP OOP Concept last year following your guides and now I have improved by building project like mobile wallet.
But now my structures are not well fine. I want to have a correct autoloader with Namespaces/Use.
Please you can refer me to a link.
Thanks 🙏🙏
Would it be better to put models, views and controllers into separate folders? And if so, do we need to put an includes of whatever folder a class needs to extend to?
I couldn't find other videos mentioned around 6:30? Are they out?
Nope, none of them are out yet. I do have the posting system ready to be recorded, but I don't know when I get around to it.
@32:13 You start creating your first IF stmt execute fails, but you send the user header to "profiles.php..."
Should this be "../profiles.php" as it is in the parent folder?
This error check remains unused in your video because you haven't made any mistakes, so I'm just checking whether it would work if there was a mistake.
Love the vids man! I am encountering an error when logged in and then clicking on my profile an error shows that the page isn’t working at the moment and with the error statement consists of “profile not found”
Great Video. I have a question about accessing the users profile page if you are not logged in When i log out, the session is canceled, and the profile page becomes unavailable. How can I make viewing the profile page available to all users at any time? I feel like I am missing something simple.
Thanks for this very cool PHP Video. But could you make a password recovery system in oop php.
Hi, Your videos so amazing and your teaching so good. I have done all your steps of login system and user profile page but i have one problem that i cant see any of my users_id from users table into profiles table instead of i getting error message of this "profile.php?error=profilenotfound" after create new account. Can you please help me.
Thank you so much.
Can you make a tutorial about using rest API with php?
Can this also work with if you use Ajax to submit the form and for error handling ?
Heyy
Can you make a video about crud table with delete, edit button and with bootstrap in php pls.
Thanks for your content
Thanks alot!
Whan kind of changes should i make if for an example i was trying to change the Users data like his uid,pwd,email ?
great 🖤🖤
The ID column in the profiles table says NULL, but everything else works fine! Could the issue be inside the setProfileInfo()? I don't know where to start troubleshooting...
can you create a video without using oop PHP please
was already learning from using just PHP and would like to continue like that
Nice!
Thanks bro
can u do the same tutorial but with mysqli?
is it okay to use the procedural login system in this kind of system? because I use the one that is procedural in your tutorials, thank you.
Procedural and OOP are just to different ways of doing things. There is no "right or wrong". You need to look at "which is the better tool for the job". In my opinion, OOP is better when you start creating something like a login system or a profile page system, since it gets to the complexity level where OOP is more beneficial. 🙂
Don't be scared of getting into OOP. because you WILL need to learn it to become a PHP developer. 🙂 Only use Procedural if you have a good reason to, and not because you feel uncomfortable with OOP.
@@Dani_Krossing Until finding your channel I did not only feel uncomfortable by programming OOP (I did roughly understand how to) - I learned about it in other programming languages C, C#,VB) I was not able to figure out, why this should be beneficiary. Although I handled with quite large own programmed projects (80 Modules, 3 Databases) I often programmed simultaneously in procedural and OOP and always when I needed to debug I felt it was easier to follow what happened in procedural. But now I am coming close to understand the benefits. I still would say that at the end procedural is shorter and therefore the resulting program is smaller and maybe even slightly faster.
I would really enjoy to get in contact with you just to discuss some points (not only programming) as I feel you are a great and interesting person with a great way to transfer thoughts into words. At my age (I'm 46) I appreciate to get to know people and have interesting and rewarding discussions/chats about the world and his brother 🙂
Best
Christian
what is the year version of your visual code?
Great! OPP + some action!
P.s maybe you by chance can teach how to build MVC and use it in production?
Дякую за відео.
Det var så lidt!
@@Dani_Krossing Danish is your native tongue? 🤔🙂
Danke für das Video auch von mir 🙂
Dani, I have joined both your youtube and patreon memberships I am not seeing where I can get the link to download the code from you lessons
It's this Patreon post here 🙂 : www.patreon.com/posts/lesson-material-42361704
When I followed the login system and then this one, everything works except my session will not start and it seems like the session variables aren’t being set. Do you know what could be causing this? If I put “session_start()” in each page, it gives a warning about it being done multiple times, but when I resolve that, it’s not showing the info that it should be when logged in.
Edit: I figured it out lol
can you please share your solution i'm stuck on the session
Dani I have a question, what is the level of php in this video? It's beginner, intermediate or advanced?
It's pretty beginner level. It's meant as a exercise to help new people get the grasp of PHP, not to create a production ready system. For that you would typically be using a framework, and not try to hardcode it yourself.
How can I connect a login system to a shopping cart system for example in user-00 logged in and put any in the shopping cart and logged out then logged in again but as the same time if user-02 logged in will not see the things in the user-00 cart
your english is stunning broo how can i get you
Dani,
my vsc is showing a red < when trying to add
Hi how to display php echo value to pure html file using js can you upload the vedio . I want separate file html ,php .
You are very good teacher but please try every step as possible you start trying code after more than an hour
hi... good day... im ralph... i have a to many redirect problem when i click the users name near the logout... what did i do wrong... i am self learner too...
Hello I watched all the tutorials for building a subscribe and loggin system with profile page -i implemented it in my projects everything works so far, users are susbscribed in the database the profile page is created but when subscribing i dont get to the profile page i always get the error: profilenotfound. Can anyone help me with that problem?
I updated my xammp and still having the error HTTP ERROR 500 is a server error from the last video oop php login system
Please Tell Me How Can Download Your Template In This Project?
Hello Dani, i have copied through the code, watched the video twice to check for any errors i made. But when i try and load the page through Xampp localhost, the browser tells me that "localhost redirected you too many times"
Is there any fix to this? This only started occurring after i created the profile system. Both the Login/Signup OOP tutorial and Forgot Password Tutorial worked but this one didn't.
Thanks in advance!
Can I use your content for business related purposes?
This content is for educational purposes. If you plan to create a live website, you should create it using a framework, like Laravel, which has build in security.
This video here isn’t secure enough, and is only meant to teach the concept of login systems.
@@Dani_Krossing I already know how to secure the database to prevent hackers by using the ? Sign in the database field I can also use visual studio code with php extension instead of using any other php framework. I just wanted to use some of your code on my project is this okay? Or no?
Hi Dani! Thank you so much for another amazing tutorial!🙏 I'm almost finished with the profile page, but ran into a problem regarding to the log in system... I can only log in with an email or only with a username, depending on in which order I type the names assigned to my collums inside the db for the uid and email.
So if I type this, I can only log in with a username:
$stmt= $this->connect()->prepare('SELECT pwdUser FROM users WHERE uidUser = ? OR emailUser = ?;');
If I change it to this I can only log in with an email:
$stmt= $this->connect()->prepare('SELECT pwdUser FROM users WHERE emailUser = ? OR uidUser = ?;');
How can I fix this so I can log in with both?
The pinned comment I made should solve that for you hopefully. 🙂
Another user wrote me about this yesterday, so my guess is that there were updates made to which databases can use the rowCount() PHP method. You should use count() instead. Again the pinned comment has the "fixed" code in it.
Out of curiosity, which database type do you use? Is it MySQL?
@@Dani_Krossing Yeah I saw that pinned comment and I tried, I'm still just trying a bunch of things... I even found another way to swap the email and uid so one of them works... but I won't give up until I can use both haha
Yeah, I think phpMyAdmin is MySQL?
Yes phpMyAdmin is MySQL 🙂
Ah... The other person who had the same error pointed out that I made 2 typos, which are the reason why you are getting the error. 😬 I included it at the top of the pinned comment of the Login System video. Hope you get it working!
🥳🥳🥳 I messed around for another hour or so and finally reminded myself about that taking a break usually results in the answer revealing itself to me when I get back to the code... Didn't expect it to be in another comment of you haha, thank you so much, again!🤗
I would find it really helpful to understand what each function/code does if you write a comment for them.
No autoloader?
i love you
how to post profile admin into user page php
Where did you go
I didn't go anywhere, I have been uploading consistently for some time. 😉
where is the github link to the source code?
My lesson notes are available to channel or patron members. Link is in the description.
any one know whats going on here?
CREATE TABLE PROFILES (
profiles_id int NOT NULL AUTO_INCREMENT,
profiles_about TEXT NOT NULL,
profiles_introtitle TEXT NOT NULL,
profiles_introtext TEXT NOT NULL,
users_id int,
PRIMARY KEY (profiles_id),
FOREIGN KEY (users_id) REFERENCES users(users_id)
);
(errno: 150 "Foreign key constraint is incorrectly formed")
I see you are naming your tables in all caps. That is most likely the error, since you are referring to a noncaps “users” in the foreign key
@@Dani_Krossing ok thank you i can fix that up, i think i found the problem my users table is named usersId and in above i have it set as users_id
Good video, but please make your words / sentences more efficient😊
You use too many words for a sentences it got me confused😂
I really like Dani's style and I always jump up for a LaOla when there comes: "With that said" - Jiiiihhaaa!!
No upfront @noviccen388 but for efficient learning book a teacher. For me this works much better as I learn better when having fun and my teacher is so "real" instead of being an allknowing robot. And indeed I usually watch a video more than one time to fully learn about the core theme. Maybe it's because I'm slow but hey, it works for me!
where is source code bro it is big shim
Perfect❤ you look like a floating head while every other thing is black😅
I need your help in a php code I can’t find it any were in the internet so if you can send your instagram or any way to contact you, you can even do a TH-cam video about it ,hope you reply…
Absolutely useful stringent insights preset, emphasizing the intact #learningcurve since #MVC 🤭😚😐🦔🦙🦘🍦🥫🥮