How To Create a User Profile Page in PHP | OOP PHP & PDO | PHP User Profile Page System

แชร์
ฝัง
  • เผยแพร่เมื่อ 24 พ.ย. 2024

ความคิดเห็น • 116

  • @net-tv7857
    @net-tv7857 ปีที่แล้ว +11

    eventually you back to PHP , we need more PHP bro, you're are amazing at explaining such topics

  • @Sebber925
    @Sebber925 ปีที่แล้ว +8

    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 🙏

  • @favour5442
    @favour5442 ปีที่แล้ว +7

    Hallelujah!!!!
    He finally shifted his attention to php😭😭😭

    • @Dani_Krossing
      @Dani_Krossing  ปีที่แล้ว +4

      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. 🙂

  • @eclipse7911
    @eclipse7911 ปีที่แล้ว +5

    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

  • @Dani_Krossing
    @Dani_Krossing  ปีที่แล้ว +12

    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;

    • @fulgorth2661
      @fulgorth2661 5 หลายเดือนก่อน +1

      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 🙂

  • @imadel3647
    @imadel3647 ปีที่แล้ว +1

    The ultimate best php course ever seen, can't stop watching this guy ❤

  • @balinttoth3812
    @balinttoth3812 ปีที่แล้ว +3

    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!

  • @pcprodoc
    @pcprodoc ปีที่แล้ว +1

    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!

  • @florinszasz5506
    @florinszasz5506 8 หลายเดือนก่อน +1

    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.

    • @Dani_Krossing
      @Dani_Krossing  8 หลายเดือนก่อน +1

      Glad I could help! 😊

  • @miguelolivar999
    @miguelolivar999 ปีที่แล้ว +2

    Thank you so much dani!!, casually I was going to start the php OOP series and you upload this video 🙏🙏

  • @pepper_101
    @pepper_101 ปีที่แล้ว

    I'm planning to go back to college and your PHP tutorials are great refreshers! Thanks for doing what you do!

  • @GerritforBazeja
    @GerritforBazeja ปีที่แล้ว +1

    Good to have you back as teacher of PHP. I loved your way of explaining and love it again. Thanks.

  • @eneshamzaj328
    @eneshamzaj328 ปีที่แล้ว

    Happy to see You Again working with PHP! ☑️

  • @photoinshot1355
    @photoinshot1355 ปีที่แล้ว +1

    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.

  • @austinnwharton
    @austinnwharton ปีที่แล้ว

    Daniel, thank you. I'm sure a video like this took a lot of time and thought. You helped me quite a bit.

  • @syntaxbytesolutions5565
    @syntaxbytesolutions5565 ปีที่แล้ว +1

    I currently needs this.
    Thanks man

  • @Visionconcept
    @Visionconcept 6 หลายเดือนก่อน

    My mentor, please continue to help us, you are doing really great.

  • @mounir101
    @mounir101 ปีที่แล้ว +1

    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.

  • @aleksandratsai1653
    @aleksandratsai1653 ปีที่แล้ว

    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 :)

  • @itsyoboiarroi
    @itsyoboiarroi ปีที่แล้ว

    Extremely high quality content for free? thanks for providing these helpful tutorials and please do a Q&A!!!!

  • @GodexWasTaken
    @GodexWasTaken ปีที่แล้ว

    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.

  • @patrickjohndonado820
    @patrickjohndonado820 10 หลายเดือนก่อน

    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

  • @fekrtmido2694
    @fekrtmido2694 ปีที่แล้ว +2

    Can you pls do a video about how to connect your login page to the shopping cart with order history?

  • @emittyarts
    @emittyarts ปีที่แล้ว

    Krossing, i love your initial hair style, like your channel profile. its neat

  • @omenyaevans2966
    @omenyaevans2966 ปีที่แล้ว

    Great stuff Dani, a great Tutor.

  • @bogdanapache8263
    @bogdanapache8263 ปีที่แล้ว +1

    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

  • @UHDking
    @UHDking ปีที่แล้ว +1

    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.

  • @CsMuia
    @CsMuia ปีที่แล้ว

    Following, thank you Dani.

  • @investigationportal
    @investigationportal ปีที่แล้ว +2

    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.

    • @Dani_Krossing
      @Dani_Krossing  ปีที่แล้ว +3

      Yes you are completely right. 🙂 Thanks for letting me know.
      Made a pinned comment with the correction.

  • @GadaStudio
    @GadaStudio ปีที่แล้ว +2

    great content dude. love your vids

    • @Dani_Krossing
      @Dani_Krossing  ปีที่แล้ว

      Thanks! 😊 Glad you enjoy it!

  • @JTalbot603
    @JTalbot603 ปีที่แล้ว

    Really appreciate your videos!!!

  • @ralphjosephjavier2386
    @ralphjosephjavier2386 ปีที่แล้ว

    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?

  • @raizudu5813
    @raizudu5813 ปีที่แล้ว

    Create some CMS mini project bro. You are amazing I learn a lot of your videos. Keep it up

  • @syntaxbytesolutions5565
    @syntaxbytesolutions5565 ปีที่แล้ว +1

    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 🙏🙏

  • @bytegga8623
    @bytegga8623 7 หลายเดือนก่อน

    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?

  • @DingDong-wk4ym
    @DingDong-wk4ym ปีที่แล้ว +1

    I couldn't find other videos mentioned around 6:30? Are they out?

    • @Dani_Krossing
      @Dani_Krossing  ปีที่แล้ว +1

      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.

  • @DanielL-t5h
    @DanielL-t5h ปีที่แล้ว +1

    @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.

  • @Frankss__
    @Frankss__ ปีที่แล้ว

    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”

  • @nateo3777
    @nateo3777 ปีที่แล้ว

    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.

  • @justjocore
    @justjocore ปีที่แล้ว +1

    Thanks for this very cool PHP Video. But could you make a password recovery system in oop php.

  • @uthayakumar2011
    @uthayakumar2011 ปีที่แล้ว

    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.

  • @sabuein
    @sabuein ปีที่แล้ว

    Thank you so much.

  • @User97356
    @User97356 ปีที่แล้ว

    Can you make a tutorial about using rest API with php?

  • @legendofgaming8481
    @legendofgaming8481 ปีที่แล้ว

    Can this also work with if you use Ajax to submit the form and for error handling ?

  • @spits_7
    @spits_7 ปีที่แล้ว

    Heyy
    Can you make a video about crud table with delete, edit button and with bootstrap in php pls.
    Thanks for your content

  • @ex0124
    @ex0124 ปีที่แล้ว

    Thanks alot!

  • @Dias_12
    @Dias_12 ปีที่แล้ว

    Whan kind of changes should i make if for an example i was trying to change the Users data like his uid,pwd,email ?

  • @abdallaomar4359
    @abdallaomar4359 ปีที่แล้ว

    great 🖤🖤

  • @Ok_Zucchini3258
    @Ok_Zucchini3258 8 หลายเดือนก่อน

    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...

  • @pelumi2738
    @pelumi2738 3 หลายเดือนก่อน

    can you create a video without using oop PHP please
    was already learning from using just PHP and would like to continue like that

  • @emadesavi8015
    @emadesavi8015 11 หลายเดือนก่อน

    Nice!

  • @abcdIsuru
    @abcdIsuru ปีที่แล้ว

    Thanks bro

  • @youngg5343
    @youngg5343 ปีที่แล้ว

    can u do the same tutorial but with mysqli?

  • @grimmjow6398
    @grimmjow6398 ปีที่แล้ว

    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.

    • @Dani_Krossing
      @Dani_Krossing  ปีที่แล้ว +1

      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.

    • @fulgorth2661
      @fulgorth2661 5 หลายเดือนก่อน

      @@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

  • @decastrojhonlesterm.4291
    @decastrojhonlesterm.4291 2 หลายเดือนก่อน

    what is the year version of your visual code?

  • @rimantasdanilevicius6754
    @rimantasdanilevicius6754 ปีที่แล้ว

    Great! OPP + some action!
    P.s maybe you by chance can teach how to build MVC and use it in production?

  • @maratzahidulin5193
    @maratzahidulin5193 ปีที่แล้ว

    Дякую за відео.

    • @Dani_Krossing
      @Dani_Krossing  ปีที่แล้ว

      Det var så lidt!

    • @maratzahidulin5193
      @maratzahidulin5193 ปีที่แล้ว

      @@Dani_Krossing Danish is your native tongue? 🤔🙂

    • @fulgorth2661
      @fulgorth2661 5 หลายเดือนก่อน

      Danke für das Video auch von mir 🙂

  • @jbaron41
    @jbaron41 ปีที่แล้ว

    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

    • @Dani_Krossing
      @Dani_Krossing  ปีที่แล้ว

      It's this Patreon post here 🙂 : www.patreon.com/posts/lesson-material-42361704

  • @DanielDuhon
    @DanielDuhon ปีที่แล้ว +1

    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

  • @taktak7980
    @taktak7980 ปีที่แล้ว

    Dani I have a question, what is the level of php in this video? It's beginner, intermediate or advanced?

    • @Dani_Krossing
      @Dani_Krossing  ปีที่แล้ว +1

      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.

  • @fekrtmido2694
    @fekrtmido2694 ปีที่แล้ว

    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

  • @gitongaMorriz
    @gitongaMorriz 5 หลายเดือนก่อน

    your english is stunning broo how can i get you

  • @angrybadger6761
    @angrybadger6761 ปีที่แล้ว

    Dani,
    my vsc is showing a red < when trying to add

  • @divyamd8509
    @divyamd8509 ปีที่แล้ว

    Hi how to display php echo value to pure html file using js can you upload the vedio . I want separate file html ,php .

  • @عليالعصفوري-ط4ض
    @عليالعصفوري-ط4ض 11 หลายเดือนก่อน

    You are very good teacher but please try every step as possible you start trying code after more than an hour

  • @japjavier6900
    @japjavier6900 ปีที่แล้ว

    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...

  • @luisasilvestri7376
    @luisasilvestri7376 ปีที่แล้ว

    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?

  • @fekrtmido2694
    @fekrtmido2694 ปีที่แล้ว

    I updated my xammp and still having the error HTTP ERROR 500 is a server error from the last video oop php login system

  • @mamaddvlpr
    @mamaddvlpr 3 หลายเดือนก่อน

    Please Tell Me How Can Download Your Template In This Project?

  • @JeffHamsley
    @JeffHamsley ปีที่แล้ว

    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!

  • @wanwan-swagg
    @wanwan-swagg 9 หลายเดือนก่อน

    Can I use your content for business related purposes?

    • @Dani_Krossing
      @Dani_Krossing  9 หลายเดือนก่อน +1

      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.

    • @wanwan-swagg
      @wanwan-swagg 9 หลายเดือนก่อน

      @@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?

  • @Mudi2783
    @Mudi2783 ปีที่แล้ว

    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?

    • @Dani_Krossing
      @Dani_Krossing  ปีที่แล้ว

      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?

    • @Mudi2783
      @Mudi2783 ปีที่แล้ว

      @@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?

    • @Dani_Krossing
      @Dani_Krossing  ปีที่แล้ว +1

      Yes phpMyAdmin is MySQL 🙂

    • @Dani_Krossing
      @Dani_Krossing  ปีที่แล้ว

      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!

    • @Mudi2783
      @Mudi2783 ปีที่แล้ว

      🥳🥳🥳 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!🤗

  • @anasn6319
    @anasn6319 ปีที่แล้ว

    I would find it really helpful to understand what each function/code does if you write a comment for them.

  • @davidbarclay6293
    @davidbarclay6293 ปีที่แล้ว

    No autoloader?

  • @pahasararuwanpathira9750
    @pahasararuwanpathira9750 ปีที่แล้ว

    i love you

  • @CharlesAnimation1
    @CharlesAnimation1 ปีที่แล้ว

    how to post profile admin into user page php

  • @ifeanyinnaemego
    @ifeanyinnaemego ปีที่แล้ว

    Where did you go

    • @Dani_Krossing
      @Dani_Krossing  ปีที่แล้ว +2

      I didn't go anywhere, I have been uploading consistently for some time. 😉

  • @johnmahugu
    @johnmahugu 11 หลายเดือนก่อน

    where is the github link to the source code?

    • @Dani_Krossing
      @Dani_Krossing  11 หลายเดือนก่อน

      My lesson notes are available to channel or patron members. Link is in the description.

  • @Nathan-ot9eu
    @Nathan-ot9eu ปีที่แล้ว

    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")

    • @Dani_Krossing
      @Dani_Krossing  ปีที่แล้ว

      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

    • @Nathan-ot9eu
      @Nathan-ot9eu ปีที่แล้ว

      @@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

  • @novianindy887
    @novianindy887 ปีที่แล้ว +2

    Good video, but please make your words / sentences more efficient😊
    You use too many words for a sentences it got me confused😂

    • @fulgorth2661
      @fulgorth2661 5 หลายเดือนก่อน

      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!

  • @mame4242-i6v
    @mame4242-i6v ปีที่แล้ว

    where is source code bro it is big shim

  • @detanatorxxx52
    @detanatorxxx52 ปีที่แล้ว

    Perfect❤ you look like a floating head while every other thing is black😅

  • @fekrtmido2694
    @fekrtmido2694 ปีที่แล้ว

    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…

  • @povilasbrilius
    @povilasbrilius ปีที่แล้ว

    Absolutely useful stringent insights preset, emphasizing the intact #learningcurve since #MVC 🤭😚😐🦔🦙🦘🍦🥫🥮