HTML Template to PHP Website & Login in OOP MVC | PHP Framework from scratch | Full Tutorial & Code

  Рет қаралды 78,532

Quick Programming

Quick Programming

Күн бұрын

Пікірлер: 286
@fal8202
@fal8202 3 жыл бұрын
Seriously, one of the best programming teachers; you describe the thinking process behind the code. Thanks to you, I made real progress understanding the concepts behind MVC using OOP PHP. I would appreciate it if in your next videos, you would emphasize even more ,the relationships between the Model View and Controller which are related to any file you happen to be working on. For beginners like myself, repetition is king :) Appreciate your efforts.
@QuickProgramming
@QuickProgramming 3 жыл бұрын
Thanks, I appreciate your compliment and feedback. It will surely help me teach better next time. I'll try and emphasise that a lot more. Thanks again,😊
@richiddraphael_99
@richiddraphael_99 2 жыл бұрын
Myself too. He is one of the best indeed. I'm really happy for this course. I love the structure ❤ just what I was looking for. I love learning from you Sir. Gracias for your work!🙏 We appreciate
@apostlesaviourk3901
@apostlesaviourk3901 9 ай бұрын
One of the prolific programming mentors. I been following your tutorials every step of the wsy, concise and incredible details well elaborated.
@matthewidungafa6046
@matthewidungafa6046 3 жыл бұрын
I regret why i didnt know your channel like 3 years ago. You are the best bro
@QuickProgramming
@QuickProgramming 3 жыл бұрын
Thanks, I appreciate the compliment😊☺️
@ahmedkamal-vc5ze
@ahmedkamal-vc5ze 3 жыл бұрын
@@QuickProgramming Me too bro, lots of tears, of sadness and pleasure at the same time
@scothbrown9462
@scothbrown9462 Жыл бұрын
Bruv at the beginning i saw to many positive reply, I felt was those channels that pay bots to comment but bruv you are providing raw value. We should be paying for this fam 😪❤️
@QuickProgramming
@QuickProgramming Жыл бұрын
I appreciate your compliment and feedback, it really means a lot. Am also glad you found my information useful. Happy coding and good luck in your future projects :)
@LasTCursE69
@LasTCursE69 6 ай бұрын
Very underrated channel.. Clear explanations, good practices, in-depth tutorials.. (only thing that drives me nuts is putting the opening curly brace below the expression.. xD)
@buyigumede7192
@buyigumede7192 4 жыл бұрын
Hello there, you have made everything so simple. May I ask that you continue with the tutorial and maybe add a database of either employee information or learner information.
@QuickProgramming
@QuickProgramming 4 жыл бұрын
Thanks. thats a good idea. i'll add more of this with extra functionality and more tables
@emmaguesmi4488
@emmaguesmi4488 3 жыл бұрын
@@QuickProgramming yes please !! very very helpful ! waiting for the database one :))
@pythonlife
@pythonlife 2 жыл бұрын
@@QuickProgramming Thank you for all the lessons and courses, but the most important thing is the background music. Do not let me focus. Please do not use any background music. Thank you.
@quranandsunnah1417
@quranandsunnah1417 2 жыл бұрын
my dream channel you made videos for newbies like a spiritual doctor that rightly treats patients without asking them what is happening to them thanks
@QuickProgramming
@QuickProgramming 2 жыл бұрын
awesome to hear :) and thanks for the awesome feedback
@DrewNorman
@DrewNorman 3 жыл бұрын
I have watched many tuts on MVC you make this so simple to understand thank you so much.
@QuickProgramming
@QuickProgramming 3 жыл бұрын
Thank you. I appreciate your feedback as well😊☺️ am glad to have helped
@ashiqurrahman1600
@ashiqurrahman1600 Жыл бұрын
WOW, one of the best programming teachers...
@QuickProgramming
@QuickProgramming Жыл бұрын
Thank you, i really appreciate
@grosuvali3647
@grosuvali3647 2 жыл бұрын
Hello mate. Big fan over here. I'm studying php and I managed to complete this wonderful tutorial of yours. I try to incorporate everything I learn into a project that I have as homework. I would need to add comments to each post. I tryed and tryed but I'm doing something wrong because I can't even manage to add the comments to the database. If you could help I will be very very gratefull. Nevertheless thank you for the great free content that you are providing. I am yet to find a better teacher than you on youtube.
@QuickProgramming
@QuickProgramming 2 жыл бұрын
thanks for the kind words. unfortunately i dont have a tutorial specific to comments, i'll make one soon. but i do have a playlist where i added comments. link below. check the videos in the list to see where the comments coding starts, and watch those. the concepts are the same kzbin.info/www/bejne/jJaymaZ-oLKUgbM
@grosuvali3647
@grosuvali3647 2 жыл бұрын
@@QuickProgramming thank you for taking your time to answer. I will be following the rest of your tutorials as soon as my done with my courses.
@grosuvali3647
@grosuvali3647 2 жыл бұрын
@@QuickProgramming are you still using the mvc model on this project? I took a peek but I didn't manage to get how I can make it work for me unless I watch the hole series and unfortunately I don't have time to do that now. Thank you very much anyway. Great work.
@agboorohussein4726
@agboorohussein4726 2 жыл бұрын
A good and credible source of learning.We cant thank you enough. Wishing you the best ever.However, going ahead on explaining the .htaccess file would help more pls.Particularly from the basics to include how to enable it on each operating systems among other things- Don't forget- you're our teacher, we are learning from you. Many thanks.
@QuickProgramming
@QuickProgramming 2 жыл бұрын
cool, noted
@agboorohussein4726
@agboorohussein4726 2 жыл бұрын
Wish that you could pls make a tutorial on PDO installation as well as enabling it from scratch. Thank you in advance as i anticipate your positive response. I actually do not want to restrict myself to the MYSQLi extension or perharps a recommendation on where to learn it pls.
@obadiahsiocha4557
@obadiahsiocha4557 2 жыл бұрын
Watched several of your tutorials, ready to start coding
@QuickProgramming
@QuickProgramming 2 жыл бұрын
Awesome, all the best☺️
@MaiLe-ct5rw
@MaiLe-ct5rw 3 жыл бұрын
It's easy to understand and make everything so simple. You are a worth teacher.Thanks for all
@QuickProgramming
@QuickProgramming 3 жыл бұрын
thank you so much. i really appreciate you feedback :))
@t.h.a.t9245
@t.h.a.t9245 2 жыл бұрын
Your channel deserves millions views & subscribers sir. Thanks for all
@QuickProgramming
@QuickProgramming 2 жыл бұрын
thanks :) So nice of you
@loislagerweij466
@loislagerweij466 Жыл бұрын
Halfway through and you are saving my life thank you
@adnanCreativeHub
@adnanCreativeHub 11 ай бұрын
Best one found on KZbin... ❤
@Wangaruro
@Wangaruro 3 жыл бұрын
Wow! Your way of explaining is just amazing!!! Thanks!
@QuickProgramming
@QuickProgramming 3 жыл бұрын
You're very welcome! and thank you for the compliment :)
@almohammedyz
@almohammedyz 3 жыл бұрын
IT IS VERY ADVANCED TUTORIAL, THANK YOU VERY MUCH ...
@patsdrone8646
@patsdrone8646 3 жыл бұрын
This is by far the best videos on the subject. Better than most training courses you will pay for. Thank you for sharing. Only one interrogation: according to what I read about the MVC framework, aren't the database access and manipulation supposed to be in the model class?
@QuickProgramming
@QuickProgramming 3 жыл бұрын
thanks for the awesome compliment. yes models are generally used to read and write to the database, but occasionally the controller can handle that too to avoid the complexity of model structures. but in this tutorial, i did use models. but its been a while since i made this video so i may have forgotten. could you point me to a timestamp of what you're referring to so i can answer specifically on that part?
@patsdrone8646
@patsdrone8646 3 жыл бұрын
@@QuickProgramming Around 1:15 when you create your Database class. I thought everything surroundings the database should be in the model, you put it in the core subfolder.
@QuickProgramming
@QuickProgramming 3 жыл бұрын
@@patsdrone8646 a model doesnt connect directly to the database. a model uses the database class to connect to the database. for every table in the database, ideally there should be a model. this means each model is only responsible for one table e.g the user model connects to the users table. that way you dont have to specify what table you want the data from. it will have all the methods for getting data and saving data to that particular table. in short, a model simply generates the required queries. that way instead of you typing a query, you can do something like $user->create_user($data); without having to worry about the actual query involved. but the query still has to go to the database class to be executed. only the database class connects to the database. i add it to the core folder because its used by almost all classes. makes things easier
@tko786
@tko786 3 жыл бұрын
Hi , Sir your teaching soo easy , amazing, MVC tutorial very easy ,thanks for this video.i would like to follow your channel for web development
@QuickProgramming
@QuickProgramming 3 жыл бұрын
Thanks, that's awesome to hear. Hope you learn more from the channel😊😊
@love_hunter_coc
@love_hunter_coc 4 жыл бұрын
Thank you sir we need more video with PHP website and database
@QuickProgramming
@QuickProgramming 4 жыл бұрын
thanks, good to know. am actually working on more of this type of tutorial and even tools to making the creation of HTML templates easier
@love_hunter_coc
@love_hunter_coc 4 жыл бұрын
@@QuickProgramming thank you sir for your appreciate we are love watching your 🙏🏻
@wissembencheikh389
@wissembencheikh389 3 жыл бұрын
this tutorial is a life saver
@QuickProgramming
@QuickProgramming 3 жыл бұрын
glad to hear it. thanks for the feedback!
@aryanpradhan5820
@aryanpradhan5820 3 жыл бұрын
Really love your teaching procedure, it is awesome.....can you have lessons on Udemy...
@QuickProgramming
@QuickProgramming 3 жыл бұрын
thank you for the compliment. i dont yet have lessons on Udemy but am working on it. i will have some very soon
@dominicdeheuer937
@dominicdeheuer937 3 жыл бұрын
@@QuickProgramming Looking forward to it, sir! More powr to you!😀
@aldrine.virtudazo9902
@aldrine.virtudazo9902 2 жыл бұрын
I"ve been practicing this year on MVC and I could literaly understand you than my professor
@QuickProgramming
@QuickProgramming 2 жыл бұрын
Thats awesome to hear. am glad i could help improve your knowledge :)
@ezzeldienmagdy3455
@ezzeldienmagdy3455 Жыл бұрын
you are great man keep it up
@tigerschool1509
@tigerschool1509 3 жыл бұрын
Awesome tutorial. I have encountered a challenge: the PHP MVC Class loaded locally but not when uploaded to the online host
@gabriellabete617
@gabriellabete617 3 жыл бұрын
TY and saalute to you sir!! this tutorial is Gold
@QuickProgramming
@QuickProgramming 3 жыл бұрын
You're most welcome☺️
@tonyvito5062
@tonyvito5062 3 жыл бұрын
best mvc tutorial on mvc so far , thanks so much you are a life saver but please do another tutorial and use namespaces, composer and packages
@QuickProgramming
@QuickProgramming 3 жыл бұрын
if you want to know a little about namespaces, check my playlist on OOP on the channel. am yet to make something on composer
@codobyte
@codobyte 2 жыл бұрын
@@QuickProgramming Any time soon???
@diederikslob
@diederikslob 3 жыл бұрын
Very nice as an introduction to OOP and templating! I have one thing I'd like your feedback on. This is your code: public function read($query,$data = []) { $DB = $this->db_connect(); $stm = $DB->prepare($query); if(count($data) == 0) { $stm = $DB->query($query); $check = 0; if($stm){ $check = 1; } }else{ $check = $stm->execute($data); } .....etc I changed it a bit to make it look more logical to me. This does exactly the same thing, right? public function dbRead( $query, $data=[] ){ $db = $this->dbConnect(); if ( count( $data ) == 0 ){ $stmt = $db->query($query); $check = $stmt ? 1 : 0; } else{ $stmt = $db->prepare($query); $check = $stmt->execute($data); }
@QuickProgramming
@QuickProgramming 3 жыл бұрын
sure, it does the same thing. glad to hear the video was useful
@dfordemo981
@dfordemo981 3 жыл бұрын
i have a tiny problem, in 30:39, the path of file_exists() why it is "../app/controllers/" instead of "./controllers/", i mean go up one directory and enter the controllers folder then the file name, why it is from app/controllers/. Both these folders core and controllers are in the same folder app
@QuickProgramming
@QuickProgramming 3 жыл бұрын
remember that we added an htaccess file that redirects all requests to the index page. so ALL paths are relative to the index page, regardless where you are on the website. thats why we move one folder above the public folder and into the app folder. hopefully that makes sense
@dfordemo981
@dfordemo981 3 жыл бұрын
@@QuickProgramming yeah, thanks
@juneldelacuadra5973
@juneldelacuadra5973 2 жыл бұрын
Thank you so much sir... Please make a tutorial on how to upload this project and make it live.
@tameramer1465
@tameramer1465 3 жыл бұрын
very awesome . thanks bro but i have a question. if i should as a developer in a company should i write all that code without aid specially code for the image crop. it is very long code? or i can copy and paste it?
@QuickProgramming
@QuickProgramming 3 жыл бұрын
the more you're able to write code alone, the better of a programmer you will be. but you can copy and paste at first, its ok
@ucanhly1166
@ucanhly1166 2 жыл бұрын
Thank you for your tutorial! I have a question is in the "controllers/home" why class Home can initialize the Class Database() without include/require.
@QuickProgramming
@QuickProgramming 2 жыл бұрын
the database class is included/required through the init.php or autoload.php files. i cant remember which one i used in this project. so its always loaded no matter what page you're on. all files in the core folder are always loaded
@ucanhly1166
@ucanhly1166 2 жыл бұрын
@@QuickProgramming thank you I got it after a little time searching gg and analyzing the code.But I appreciate what you did.Keep it up! Love ya
@tallslimpr
@tallslimpr 3 жыл бұрын
Very very very well done!
@QuickProgramming
@QuickProgramming 3 жыл бұрын
Thank you very much! i appreciate the feedback
@dfordemo981
@dfordemo981 3 жыл бұрын
really a great video, thanks
@QuickProgramming
@QuickProgramming 3 жыл бұрын
thanks for the feedback and you're most welcome!
@albertnapolis2690
@albertnapolis2690 3 жыл бұрын
Thank You for this wonderful tut sir. But I would like to ask if it is okay to not end the session when you were logout from the page? Thank for the answer in advance.
@QuickProgramming
@QuickProgramming 3 жыл бұрын
you're most welcome! if you dont end the session then the user wont be logged out. thats why its important to clear the session, that way if another person comes to use the same device, they will have to log in again
@albertnapolis2690
@albertnapolis2690 3 жыл бұрын
But sir in the logout part i didn't saw you destroying the session. I'm really sorry for asking too much I am really new to this.
@QuickProgramming
@QuickProgramming 3 жыл бұрын
@@albertnapolis2690 i unset the data in the session. thats enough to log out
@okiroroobrutheanagho8779
@okiroroobrutheanagho8779 4 жыл бұрын
Great man. I was thinking of this and then you got me. Thanks.
@QuickProgramming
@QuickProgramming 4 жыл бұрын
nice. am glad to hear that
@chintansuthar1544
@chintansuthar1544 3 жыл бұрын
Thank you sir ❤️👍
@QuickProgramming
@QuickProgramming 3 жыл бұрын
you're most welcome
@danielayaz5790
@danielayaz5790 2 жыл бұрын
Having an issue at 3:55:00 when I click on images on the index page. When I click them, I am not being brought to the single_post.php view. I can see that the URL is being updated in the search bar but nothing else changes. What am I doing wrong?
@QuickProgramming
@QuickProgramming 2 жыл бұрын
what link does it change to in the address bar when you click on the image?
@edunoluwasegun5093
@edunoluwasegun5093 Жыл бұрын
Thank you for the beautiful tutorial, i have a question though how were you able to use the $_SESSION global variable without having to call the session_start() function at the top of the pages where they were used. Thank you
@QuickProgramming
@QuickProgramming Жыл бұрын
The index page has session start in it and it's always loaded no matter what page you're on
@edunoluwasegun5093
@edunoluwasegun5093 Жыл бұрын
@@QuickProgramming thanks a lot
@edunoluwasegun5093
@edunoluwasegun5093 Жыл бұрын
@@QuickProgramming Hi sorry for bothering you, I checked your codebase but it wasn't there, when I added it in mine, I still couldn't access the upload page even after logging in but I could when I added session_start to the check login function
@QuickProgramming
@QuickProgramming Жыл бұрын
@@edunoluwasegun5093 like i've said already, the session_start function is in THE INDEX page. it takes 2 seconds to check the index.php page and see the session_start() function since the page literary has 3 lines of code. On top of that the video shows me adding the session_start() function at 8:00 which you should have seen had you watched the video. I dont know what else to tell you at this point
@conra7837
@conra7837 2 жыл бұрын
Hello, thank you very much for the video, it is excellent!. If you would extend your kindness and answer my question, I would like to make a change in the database class to add transaction-commit-rollback, how can I call these PDO methods from my controllers through the database class? PDO::begintransaction(); will produce and error. Thank you!
@sundus9399
@sundus9399 3 жыл бұрын
I love u MAAAAAAAAAAAAAN 😍😘😘
@QuickProgramming
@QuickProgramming 3 жыл бұрын
you're far too kind, thanks :)
@robertshirck1321
@robertshirck1321 3 жыл бұрын
At time 3:30:15: making thumbnails. I have the big images in the folder “images”. In Class Home extends Controller, when the method “get_thumbnail” is called, which then calls “resize_image_crop()”…all is good until the program reaches a statement “@image = imagecreatefromjpet($original_image_path);” that produces the error: "Call to undefined function imagecreatefromjpeg()". I am unable find the function imagecreatefromjpeg! Any thoughts will be appreciated. Thank you.
@QuickProgramming
@QuickProgramming 3 жыл бұрын
Gd library is not enabled in your php installation. Open php.ini and remove the semicolon at the start of the line, ; extension=gd Restart Apache
@robertshirck1321
@robertshirck1321 3 жыл бұрын
I have enabled the server extension: "extension=gd" and now I get all big images. Might keep me busy for a while!
@lifelovelaugh9740
@lifelovelaugh9740 2 жыл бұрын
@@QuickProgramming Have same problem, all works fine! Thanks!
@life_with_masa
@life_with_masa 3 жыл бұрын
Golden ✨
@QuickProgramming
@QuickProgramming 3 жыл бұрын
thanks!
@nickjames2091
@nickjames2091 Жыл бұрын
Thanks for this tutorial. I have a problem with the login and signup part, it feels so different from yours.
@QuickProgramming
@QuickProgramming Жыл бұрын
what errors do you get?
@nickjames2091
@nickjames2091 Жыл бұрын
Thanks for the reply sir. There is no actual error, but when I click on create an account there is no toggle that shows the email , i.e sign up option. Thanks 🙏
@nickjames2091
@nickjames2091 Жыл бұрын
It’s just a plain login page without a signup toggle that displays email.
@septruiz3446
@septruiz3446 3 жыл бұрын
Hi, amazing tutorial. everything worked beautifully. I'm still studying the code.
@QuickProgramming
@QuickProgramming 3 жыл бұрын
i dont remember the code very well but try this. go to the part where the query is submitted to the database. the code should be something like $DB->write or $DB->save. after that code, put die(); to make sure the script stops at that point. then check to see if the data was still saved twice. if not then the problem happens after that point. if it saved twice, then the problem happens before that point. either way let me know the result
@septruiz3446
@septruiz3446 3 жыл бұрын
@@QuickProgramming Thanks so much for your fast and accurate response. Yes, the problem was exactly in models/user.php, the statement $data = $DB->write($query,$arr); by mistake, I had written the statement twice. Thanks a million. This is the best PHP tutorial I had encountered!
@QuickProgramming
@QuickProgramming 3 жыл бұрын
@@septruiz3446 am happy it worked out! You're most welcome☺️😊
@pythonlife
@pythonlife 2 жыл бұрын
Thank you for all the lessons and courses, but the most important thing is the background music. Do not let me focus. Please do not use any background music. Thank you.
@rahulshiroor3739
@rahulshiroor3739 4 жыл бұрын
Hello Sir, Can you make one more video on how to add Jquery/Ajax in MVC please..!
@QuickProgramming
@QuickProgramming 4 жыл бұрын
Sure I'll add some jquery in one tutorial
@cosycruise5575
@cosycruise5575 3 жыл бұрын
Hi your tutorial is awesome, can we remove public folder from or we can run the index.php outside the public folder?
@QuickProgramming
@QuickProgramming 3 жыл бұрын
It's not a good idea to do that for security reasons. The public folder is there for protection, to stop your important files from being downloaded by a hacker. What problem are you having that made you suggest that?
@seeker3794
@seeker3794 6 ай бұрын
Thanks a lot man.❤
@armanbalian5675
@armanbalian5675 3 жыл бұрын
First thank you for this awsome tutorial 🌹 Second am having problem when linking assets i linked them the same way you did but it didnt work the page keeps loading without the css owl ana java sctipts even pictures aren't showing😓
@QuickProgramming
@QuickProgramming 3 жыл бұрын
did you manage to fix this? if not, echo your ASSETS constant and paste your result here, same with your ROOT constant. then check the page source of your page and copy your CSS file link and paste it here. the difference will show and i'll tell you which part is wrong
@pwrdbyhatred
@pwrdbyhatred 2 жыл бұрын
Hi. Can you please a video on how to debug a php code. Thank you and more power!
@QuickProgramming
@QuickProgramming 2 жыл бұрын
i dont have a dedicated video for debugging but i think i talked about it in this video kzbin.info/www/bejne/o5_Thnqlo9B9mLc
@pooyasadeghi7551
@pooyasadeghi7551 2 жыл бұрын
Hi thanks for this awesome tutorial 👍👍 But i have a problem in pagination part When im in "example/public/home" the prev and next btn works well but when its "example/public/" ( default controller and default method) it doesn't add "?" Mark and after clicking next btn the url is "example/public/page=3". Thank you very much.
@hamadpashua1086
@hamadpashua1086 4 жыл бұрын
thanks for the tutorial sir, but why dont we use namespaces in our mvc. since it more popular and have better autoload features too. like other frameworks thanks?
@QuickProgramming
@QuickProgramming 4 жыл бұрын
thanks. i didnt use namespaces because this is tailored toward beginners. namespaces would add unnecessary complexity for now. i'll make more tutorials like this and will add namespaces in future
@hamadpashua1086
@hamadpashua1086 4 жыл бұрын
@@QuickProgramming thanks, am waiting for that :)
@borisbar4148
@borisbar4148 2 жыл бұрын
Really awesome tutorial, but I’ve got one question: You’ve left the methods of the Database class to public. Is this intended?
@QuickProgramming
@QuickProgramming 2 жыл бұрын
yes. without public methods, a class would be unusable. public simply means they can be accessed from outside the class. it has nothing to do with security, except for select instances where that could be the case
@QuickProgramming
@QuickProgramming 2 жыл бұрын
you can watch my series on OOP if you wish to know more kzbin.info/www/bejne/raOZdqilpLCpgrc
@borisbar4148
@borisbar4148 2 жыл бұрын
@@QuickProgramming Thanks for the quick response! I sure will watch it! Another thing: I’d like to hide the "public" folder from the URL but my attempts all lead to not finding the pages at all.
@QuickProgramming
@QuickProgramming 2 жыл бұрын
@@borisbar4148 theres no need to hide it. when launching your website online, whichever folder you're given to put your files in will represent the public folder. this means you wont need to put "public" in your URL. its just for your localhost
@rafifahadila4206
@rafifahadila4206 2 жыл бұрын
This tutorial is amazing, it helped me to understand more about how to implement OOP on the real project, i've got a question tho, i hope you see and answer it coz i've been strugling for the past week, i had practice to build a website using yours tutorial however i got stuck with uploading the website to the internet aka hosting, i've been watch a lot of tutorial and search it but none of them worked, could you show me how to host the web with yours franework, thanks a lot 🙏
@QuickProgramming
@QuickProgramming 2 жыл бұрын
did you manage to upload it?
@rafifahadila4206
@rafifahadila4206 2 жыл бұрын
​@@QuickProgramming i failed it, so not yet if you have a way that would be helpful :)
@sibusisompanza9347
@sibusisompanza9347 8 ай бұрын
did you host the website? I am struggling too
@heftig.7614
@heftig.7614 3 жыл бұрын
thx for this great tutorial. just one question: i struggle understanding why u always unset the first 2 parameters. what if u dont unset them.. at around 35min. why do u want to get them off the array? thx
@heftig.7614
@heftig.7614 3 жыл бұрын
Ah, maybe i got it... u unset the controller and its method, so that you can put the remaining elements into the params array... and then u basically run the controller and its method via call_user_func_array and pass the params to it? If you didnt unset before, you would pass the controller and method as well to its method, right?
@QuickProgramming
@QuickProgramming 3 жыл бұрын
@@heftig.7614 yes exactly. but thers another reason. imagine these two links: website.com/profile/index/1234 website.com/profile/1234 both lead to the same controller and same method. but if we didnt unset the first two, it will be hard to tell where the $id variable is. in the first link, there will be 3 params, while in the second, there will be 2. in the first one, the id will be in the 3rd param, while in the second, the id will be in the second. this would make coding harder. you can remove the unset temporarily and test it. that will help you understand the problem even more.
@heftig.7614
@heftig.7614 3 жыл бұрын
@@QuickProgramming wow, thx for the quick & great response. now i got it 100%. and btw, top content.... 1 more subscriber for you.
@Samuel-ns5jb
@Samuel-ns5jb 2 жыл бұрын
Please can you make tuts on codeIgniter, please. Thank you for the videos
@QuickProgramming
@QuickProgramming 2 жыл бұрын
will do soon :))
@Samuel-ns5jb
@Samuel-ns5jb 2 жыл бұрын
@@QuickProgramming thank you.
@Lev15011948
@Lev15011948 3 жыл бұрын
Just starting another of your tutorials and have a question - you have spelt protocal instead of protocol - does it make a difference?
@QuickProgramming
@QuickProgramming 3 жыл бұрын
It depends. At what time stamp is it?
@sanketSanket
@sanketSanket 3 жыл бұрын
@@QuickProgramming It is at 1:04:34 - but thanks very much for the tutorial. It is awesome.
@QuickProgramming
@QuickProgramming 3 жыл бұрын
@@sanketSanket ive seen it now. it does matter. i dont know how i missed that
@Amir_s_Dev
@Amir_s_Dev 3 жыл бұрын
thanks a lot
@QuickProgramming
@QuickProgramming 3 жыл бұрын
You're most welcome☺️
@agamurat3019
@agamurat3019 10 ай бұрын
for example my route is categories/:id/show, in this case id is param and show is method, how would you handle this?
@QuickProgramming
@QuickProgramming 10 ай бұрын
There I no need to structure your links that way. Just swap the id and method so it conforms to the standard you have set. E.g categories/show/:id It's better to put it this way because it's not every link that will have an id. So if you put the id first, what happens when you have a link that doesn't have an id? It won't work well
@b48mfjrccarspartsandhowtob59
@b48mfjrccarspartsandhowtob59 Жыл бұрын
The tutorial is awesome in terms of content, but quite slow in terms of speed. I had to put it in x1.5. Also, the amount of typos and mistakes can become really frustrating at some point. It seems like you are doing it based on examples you found on-line and not experience. An updated version with less mistakes and a normal speed would be amazing.
@burgasHoH
@burgasHoH 4 жыл бұрын
Great Video ! I have some videos with HTML
@safaeezzerrouqi1923
@safaeezzerrouqi1923 3 жыл бұрын
hello your tuto is great but I have a problem whenever I write /about or /contact it shows the home page I tried to look on yr source code and I found evrything right so why it keeps showing home page even when I change URL?
@QuickProgramming
@QuickProgramming 3 жыл бұрын
it means it cant find the controllers for those pages. so there must be a problem in your app.php file
@safaeezzerrouqi1923
@safaeezzerrouqi1923 3 жыл бұрын
@@QuickProgramming I did the same code class App{ private $controller = "home"; private $method = "index"; private $params = []; public function __construct() { $url = $this->splitURL(); if(file_exists("../app/controllers/". strtolower($url[0]) .".php")){ $this->controller = strtolower($url[0]); unset($url[0]); } require "../app/controllers/". $this->controller .".php"; $this->controller = new $this->controller; if(isset($url[1])){ if(method_exists($this->controller, $url[1])){ $this->$method = $url[1]; unset($url[1]); } } //run the class and method $this->params = array_values($url); call_user_func_array([$this->controller,$this->method] ,$this->params); } private function splitURL(){ $url = isset($_GET['url']) ? $_GET['url'] : "home"; return explode("/", filter_var(trim($url,"/"),FILTER_SANITIZE_URL)); } }
@QuickProgramming
@QuickProgramming 3 жыл бұрын
@@safaeezzerrouqi1923 it looks fine. just after this code: $url = $this->splitURL(); add this code, run it and paste the result here. print_r($url);
@safaeezzerrouqi1923
@safaeezzerrouqi1923 3 жыл бұрын
@@QuickProgramming when I add /about it shows Array ( [0] => home )
@safaeezzerrouqi1923
@safaeezzerrouqi1923 3 жыл бұрын
when i click on about , i get this Array ( [0] => home ) , home didn't change
@Rusk_
@Rusk_ 2 жыл бұрын
Is this still up to date? Or are there better ways for example with the router or just the way the project should be set up?
@QuickProgramming
@QuickProgramming 2 жыл бұрын
Still up to date
@Rusk_
@Rusk_ 2 жыл бұрын
@@QuickProgramming okay thanks. Very good tutorial by the way
@QuickProgramming
@QuickProgramming 2 жыл бұрын
@@Rusk_ thank you, i appreciate the feedback :))
@marinknezevic6251
@marinknezevic6251 3 жыл бұрын
Hello, first of all I want to say great job for tutorial it is very useful :) Got a problem tho. I added password hashing and after that when i navigate to upload page I cant navigate nowhere else through menu, but I can navigate through url when i change it to for example public/home etc... Same goes with single post... Whenever I press home, about or contact it just stays at upload page or single post page. Can you help me please :)
@marinknezevic6251
@marinknezevic6251 3 жыл бұрын
So i guess the problem is it doesnt unset the url after i press home it looks like this when I navigate to certain image public/single_post/VIXlUktLDZ4XomyS9 , and when I try to go to home page it just adds it in url at the end public/single_post/VIXlUktLDZ4XomyS9/home I checked app file multiple times and didnt find error.
@QuickProgramming
@QuickProgramming 3 жыл бұрын
Use ROOT in your URLs. A link must have a full path starting with in order for it to navigate properly. Like this:
@marinknezevic6251
@marinknezevic6251 3 жыл бұрын
@@QuickProgramming Found the soultion, the problem was I had
@QuickProgramming
@QuickProgramming 3 жыл бұрын
@@marinknezevic6251 you're most welcome!
@rajabhishek2936
@rajabhishek2936 4 жыл бұрын
Please make videon on how to book seat in movie website using php
@QuickProgramming
@QuickProgramming 4 жыл бұрын
ok, i'll make one soon
@laovoyage
@laovoyage 2 жыл бұрын
I think I get some thing from other sources like URLs
@pythonlife
@pythonlife 2 жыл бұрын
great tutorial brother but you are not explain how to protect input from sql Injection and how to protect database
@QuickProgramming
@QuickProgramming 2 жыл бұрын
watch this for basic security kzbin.info/www/bejne/pnqyYaOjgrl9bLs
@pythonlife
@pythonlife 2 жыл бұрын
@@QuickProgramming thanks brother ur the best . Big greetings from Algeria 🇩🇿🔥
@HarritVanBeek
@HarritVanBeek 3 жыл бұрын
questio wy you dont use php spl autoload, is lot easier to use in side the applications
@QuickProgramming
@QuickProgramming 3 жыл бұрын
I use it in other projects. It's up to you if you want to use it, there's no problem with it. It's just that sometime it's not secure so it's good to use other options as well just for practice. But I do use it in other playlists on this channel
@septruiz3446
@septruiz3446 3 жыл бұрын
Hi again, I was about to complete the superb tutorial, but I got a final minute problem with the pagination. The URL pagination work perfectly; I can enter manually the number in the GET var "page". However, the buttons don't work: both buttons redirect to the current page number. I fully understand the logic, which is why I cannot troubleshoot it properly. In the line $data['prev_page'] = $pagination->generate_link($pagination->current_page_number()-1); And its next counterpart, current_page_number() returns the current page as expected and generate_link () seems to work equally well; it seems the problem is with addition/subtraction. Can you help? Please let me know if you require any further information. Kind Regards, Sept
@QuickProgramming
@QuickProgramming 3 жыл бұрын
add some code right after those lines. try and echo the number on its own like this: echo $pagination->current_page_number()-1; what number is returned? is it the current page or previous page? if the calculation happens fine here, then the fault is in the generate_link function. if it doesnt happen correctly, try type casting as integer like this: $data['prev_page'] = $pagination->generate_link((int)$pagination->current_page_number()-1); note the (int)
@septruiz3446
@septruiz3446 3 жыл бұрын
@@QuickProgramming Thank you for your ultra-fast response. I seem to have broken the pagination system somehow; when I click the buttons I get a question mark at the end of URL thus: "localhost/minima/public/page=1?" and the pagination system doesn't work anymore when I enter it manually. I think I am going to review the logic step-by-step, see if I can catch the culprit. But it is nice to know that if I get stuck you are standing by your tutorial. Thanks a million for that.
@KlausVolfield
@KlausVolfield 2 жыл бұрын
Heya, i followed your guide all the way up to 1 hour 37 minutes, where you try to load the CSS, i did the exact same thing and the CSS doesn't load for some reason. I think it has something to do with converting the html to .php because when i load the html index the CSS works
@QuickProgramming
@QuickProgramming 2 жыл бұрын
this error is caused by wrong paths. check the source of your page that inst loading css files and make sure the link to the css files is correct and is the full path, not relative path. make sure the path has "localhost" in it and is correct. if not, check the ROOT or ASSETS constant value to make sure its correct.
@KlausVolfield
@KlausVolfield 2 жыл бұрын
@@QuickProgramming hello upon further inspection, idk why it has something to do with the redirect controller function I think, when I try to click on the css in the source code, the css itself gets redirected, could something be affecting my function? It might be the ASSETS and ROOT path, but i've no idea what could be causing this. Could I also possibly ask for the sql back up of the dB?
@Samuel-ns5jb
@Samuel-ns5jb 2 жыл бұрын
I have the same problem but haven't don't know how to do it?
@freddynolimit86
@freddynolimit86 3 жыл бұрын
Why page 404.php not work..? It just showing default controller home.. How to work if file on views not found then it goto 404.php.. ? Thank you
@QuickProgramming
@QuickProgramming 3 жыл бұрын
Go to the main controller inside the view function, put an else statement to if(file_exists... part. That way if the file is not found, it will go to the else. Inside the else, include the 404 file
@freddynolimit86
@freddynolimit86 3 жыл бұрын
Oke thankyou..
@QuickProgramming
@QuickProgramming 3 жыл бұрын
@@freddynolimit86 you're most welcome
@earavichandran
@earavichandran Жыл бұрын
I have got error when we signup. Fatal error: Uncaught error. Call to member function signup() on bool in signup.php I checked the code. I can't figure it out. My php version is 8.2.12
@Sree_ShortsYT
@Sree_ShortsYT 2 жыл бұрын
localhost port number not assigning to style sheets automatically. is there any tweaks
@shylockArinaitwe1
@shylockArinaitwe1 2 жыл бұрын
Add the port like so, $path = str_replace($_SERVER['DOCUMENT_ROOT'], ":9999", $path); // this happens especially when you are using MAMP on macOs
@classiccountryland2030
@classiccountryland2030 2 жыл бұрын
Hi, I have an issue on 1:21:39 because for some reason the array [username, password, email,url_address, date] and placeholders are not working to execute the query... I know the array is correct and I know is connecting the database but looks the array is not replacing the values on the query... Exactly here... somebody knows what happen? public function write($query, $data = []) { $DB = $this->db_connect(); $stm = $DB->prepare($query); if(count($data) == 0) { $stm = $DB->query($query); $check = 0; if($stm){ $check = 1; } }else{ $check = $stm->execute($data); } if($check) { return true; }else{ return false; } }
@QuickProgramming
@QuickProgramming 2 жыл бұрын
what error are you getting? usually the problem is that the number of items(variables) in the query does not match the number of items in the provided array. so make sure all the variables in your array have a full colon, and that they match the items in the array
@classiccountryland2030
@classiccountryland2030 2 жыл бұрын
@@QuickProgramming wow wow wow! You are right... it was fixed!
@classiccountryland2030
@classiccountryland2030 2 жыл бұрын
@@QuickProgramming I have issues on this line $data = $stm->fetchAll(PDO::FETCH_OBJ); result is nothing... any idea?
@QuickProgramming
@QuickProgramming 2 жыл бұрын
@@classiccountryland2030 check the query to make sure its correct. replace the query with actual values and test it directly in phpmyadmin and see what error you get
@classiccountryland2030
@classiccountryland2030 2 жыл бұрын
@@QuickProgramming database.php function read() if I do this then it works $data = $DB->query("select * from users where username = 'Lewis' && password = '42442332' limit 1")->fetchAll(PDO::FETCH_OBJ); but if I follow exactly like you have does not work $data = $stm->fetchAll(PDO::FETCH_OBJ); Any ideas?
@randyhopkins9895
@randyhopkins9895 3 жыл бұрын
code throws errors all over, from page to page, example: Uncaught Error: Using $this when not in object thrown in /var/www/html/webproject/app/views/minima/index.php on line 2, how does this work correctly? pissed
@QuickProgramming
@QuickProgramming 3 жыл бұрын
please follow the instructions step by step as in the tutorial. dont rush to finish but to learn. that particular error means you either did not instantiate the object. or you're using $this on a static variable or similar. if i have a class like this: Class myclass{ } in order to use this class, i have to first make a copy like this: $object = new myclass(); now that its an object, i can rk with it like this: $object->myfunction(); when using the word $this inside the class, make sure the thing you're calling is part of the class and is not a static object. so i would suggest you start from the beginning, do things step by step, slowly without the urge to finish quickly. everything will work out corectly
@QuickProgramming
@QuickProgramming 3 жыл бұрын
if you have a particular spot you didnt understand in the video, leave a timestamp
@Kattyy707
@Kattyy707 2 жыл бұрын
@@QuickProgramming sorry but I'll inspected your code, really lots of errors, fatal on views folder maybe its a bug underfined variabe $data, lots messages regarding fonts and &this too..Im coding with you and I copy your source the same
@QuickProgramming
@QuickProgramming 2 жыл бұрын
@@Kattyy707 upgrade your php version. download a new version of xampp
@Kattyy707
@Kattyy707 2 жыл бұрын
@@QuickProgramming I have newest version of everything🙂
@rimantasdanilevicius6754
@rimantasdanilevicius6754 2 жыл бұрын
Is this MVC project reliable and can be used in production?
@QuickProgramming
@QuickProgramming 2 жыл бұрын
yes it is, i use it myself. but also watch my video on basic security is you want to improve it. you can improve it over time from project to project and make it even better kzbin.info/www/bejne/pnqyYaOjgrl9bLs
@DrewNorman
@DrewNorman 3 жыл бұрын
Could you add a delete function to your upload image code?
@QuickProgramming
@QuickProgramming 3 жыл бұрын
unfortunately i cant go back to this project since so much time has past. but delete a row is done via a query. all you need to know is the id of the row you want to delete. the query is something like this: $query = "delete from posts where id = '$id' limit 1"; make sure the $id variable contains the id of the row you want to delete and run the query. just duplicate the page that displays a single post and name it "delete" because the delete page works exactly the same but instead of running a read query, you run a delete query
@drewnormanwebguru
@drewnormanwebguru 3 жыл бұрын
@@QuickProgramming thank you so much makes perfect sense
@jobayer4650
@jobayer4650 2 жыл бұрын
Sir how hide single_post from url?
@sebastianlindgren8818
@sebastianlindgren8818 Жыл бұрын
Hello, I'm having a problem whith the page. It dosn't work to have more than 1 user. I was wondering how to fix this problem? Thx.
@QuickProgramming
@QuickProgramming Жыл бұрын
check to make sure your primary key column is set to auto increment. if not, then set it to that, clear your database and add new users
@sebastianlindgren8818
@sebastianlindgren8818 Жыл бұрын
@@QuickProgramming thank you very much :). I will test that.
@cykachuusethunderbolt9338
@cykachuusethunderbolt9338 2 жыл бұрын
need help, nothing's happening in phpmyadmin part, when i created the users, then tried to sign in my account is not showing in the phpmyadmin
@QuickProgramming
@QuickProgramming 2 жыл бұрын
sometimes the reason data cant be saved is because some columns are not being provided some data. so go to your phpmyadmin and click your database, then click the affected table, edit every column and make sure you set NULL active on every column. this will allow the row to save even when data for some columns is missing
@cykachuusethunderbolt9338
@cykachuusethunderbolt9338 2 жыл бұрын
@@QuickProgramming nothings changed, when i sign up in the minimalista, nothings happening, no notif that i created an account, no change in phpmyadmin, i;m sorry to bother you
@QuickProgramming
@QuickProgramming 2 жыл бұрын
@@cykachuusethunderbolt9338 try downloading the code from the description. am sure you'll be able to spot the differences
@ezzeldienmagdy3455
@ezzeldienmagdy3455 Жыл бұрын
the 404 doesnt working , whenever i write a wrong file in the url it shows me home
@syntaxbytesolutions5565
@syntaxbytesolutions5565 Жыл бұрын
database.sql is not included on the file
@banukadissanayake43
@banukadissanayake43 3 жыл бұрын
What is the error / solution for this "Fatal error: Uncaught Error: Class "Controller" not found in C:\xamppnew\htdocs ewproject\app\controllers\about.php:3 Stack trace: #0"
@QuickProgramming
@QuickProgramming 3 жыл бұрын
it means the class called controller cant be found and its being requested. make sure the file that contains the class is properly included and also check that the class name is correct. if you fail, paste the entire error so i can see more information
@husseinelhadary6143
@husseinelhadary6143 3 жыл бұрын
How to solve "Deprecated: Non-static method Home::index()" I'm using PHP 7
@QuickProgramming
@QuickProgramming 3 жыл бұрын
whats the code on the line that has the error?
@zaeedcervantes5409
@zaeedcervantes5409 9 ай бұрын
sir how to deploy these project online i hope you use these same project
@Not_Aran8276
@Not_Aran8276 8 ай бұрын
Use a hosting service by paying $ every month or yearly. Or you could complicate yourself to do it for "free" by port forwarding your local machine IP address to be public IP address on the port 80 (HTTP) and 443 (HTTPS but this requires SSL certificates like Let's Encrypt which is free and it is easier to do it on Linux). I put the word "free" in quotes because technically you're hosting your website with your home network which also means you're still paying your ISP.
@DrewNorman
@DrewNorman 3 жыл бұрын
How do you deploy this app to production?
@QuickProgramming
@QuickProgramming 3 жыл бұрын
a live server usually has a folder named public_html or similar. copy the files from your public folder into that same folder. then copy the private folder contents into a folder with same name outside the public_html folder. basically you must maintain the same folder structure even on the live server. thats pretty much it. then ofcourse export your database, create a new database on the live server and import your database from localhost. the new database you create will list its connection details, so replace the connection values with those new ones. that should do it
@jobayer4650
@jobayer4650 2 жыл бұрын
Sir how to remove public from url?
@QuickProgramming
@QuickProgramming 2 жыл бұрын
no need to remove it because it wont be needed when you move your website to a live server. its only for when you're in development mode
@jobayer4650
@jobayer4650 2 жыл бұрын
@@QuickProgramming 🥰
@patsdrone8646
@patsdrone8646 3 жыл бұрын
I have a really weird problem. Don't want anyone to analyze my code, just wondering if someone had the same problem. Each time I put a second level to the url (the function - good(like index) or not), I lost all of my CSS !!!!
@QuickProgramming
@QuickProgramming 3 жыл бұрын
i dont understand the problem. could you rephrase it?
@patsdrone8646
@patsdrone8646 3 жыл бұрын
@@QuickProgramming It's really kind to try to help, I know it's not your objective to debug people her on youtube. Sorry, but English is not my main language. If I type "public/minimalista/home" I see the Home page with all the CSS. Same thing with the about and contact page. As long as I add a sub-URL like "public/minimalista/home/index" Or anything else than index (equivalent of $this->method in the code), I still see the good page, but without any CSS at all. It's really weird. I did echo's everything I could and couldn't find what are the differences that could cause this problem.
@QuickProgramming
@QuickProgramming 3 жыл бұрын
@@patsdrone8646 check the header.php file. make sure all the css links start with
@patsdrone8646
@patsdrone8646 3 жыл бұрын
@@QuickProgramming Yes it's there! I told you, it's a weird thing. Anyway it's not a deal breaker, everything works well when I use the website menu, it's just when I enter manually the url that it doesn't work.
@QuickProgramming
@QuickProgramming 3 жыл бұрын
@@patsdrone8646 enter the url manually again and then inspect the page. check the head area, you'll see the links to the css files. you may be able to spot the error in the link. if not copy and paste one of the links here so i can check it
@chamathviranga619
@chamathviranga619 3 жыл бұрын
❤️
@adawong4996
@adawong4996 3 жыл бұрын
Can you download uploaded pictures ?
@QuickProgramming
@QuickProgramming 3 жыл бұрын
yes, just add a download button on the image: Download
@lucfrisch2742
@lucfrisch2742 2 жыл бұрын
in database.php typo ? : }catch(PDOExecption $e){
@MenAmongTheRuins77
@MenAmongTheRuins77 Жыл бұрын
1:15:00
@MenAmongTheRuins77
@MenAmongTheRuins77 Жыл бұрын
1:57:00
@MaddinS
@MaddinS 3 жыл бұрын
anyone tried the css/asset-link on a vhost (with a port)? even if i add $_SERVER['SERVER_PORT'] to the $path in config.php - and the link in the header is right.... it doesnt work. (if i put the css-file in the home-directory (localhost without port)... it works..
@QuickProgramming
@QuickProgramming 3 жыл бұрын
it should work fine even with a port number added. try and put the link directly into the browser for one of the images. use the port number as well and see if the image will load. if not then your links arent correct
@MaddinS
@MaddinS 3 жыл бұрын
@@QuickProgramming nope. with the full path it doesnt work to. but the css works if i delete the RewriteRule in the .htaccess (but then it doesnt find the url of course)
@QuickProgramming
@QuickProgramming 3 жыл бұрын
@@MaddinS put an image directly in the public folder, name it image.jpg and try to directly access it. e.g localhost:8080/website/public/image.jpg if you're able to get it then you just need to check your folder structure an make sure it matches your link
@MaddinS
@MaddinS 3 жыл бұрын
@@QuickProgramming nope. same as the css. only if i delete the rewrite-rule it shows up
@MaddinS
@MaddinS 3 жыл бұрын
@@QuickProgramming i found it.... bad typo... made a $ instead of an % in the RewriteCond :) .... but thank very much für helping :)
@kensyjolicoeur
@kensyjolicoeur 3 жыл бұрын
this course should not be free but thank you a lot
@QuickProgramming
@QuickProgramming 3 жыл бұрын
thanks for the compliment :)) and you're most welcome
@bcarespot9356
@bcarespot9356 2 жыл бұрын
The tutorial is excellent, but there are omissions that beginners should avoid. And that's next, always use
@bcarespot9356
@bcarespot9356 2 жыл бұрын
It was forgotten to implement the root to be in the public folder. If I'm wrong somewhere I'd like to hear from the developer why?
@raitasorin
@raitasorin 3 жыл бұрын
Hi there is that truth that you are from Zambia ?
@QuickProgramming
@QuickProgramming 3 жыл бұрын
Yes, that's where am from
@akonkaba1799
@akonkaba1799 3 жыл бұрын
how to change .../home?page=1 to .../home/page/1
@QuickProgramming
@QuickProgramming 3 жыл бұрын
its described in the video
@phpstudy8625
@phpstudy8625 Жыл бұрын
... and multilingual system
Tuna 🍣 ​⁠@patrickzeinali ​⁠@ChefRush
00:48
albert_cancook
Рет қаралды 148 МЛН
My scorpion was taken away from me 😢
00:55
TyphoonFast 5
Рет қаралды 2,7 МЛН
Правильный подход к детям
00:18
Beatrise
Рет қаралды 11 МЛН
Enceinte et en Bazard: Les Chroniques du Nettoyage ! 🚽✨
00:21
Two More French
Рет қаралды 42 МЛН
How to Import HTML Template In PHP | Php Template Tutorial
5:49
Web Tech Knowledge
Рет қаралды 35 М.
Create a Custom PHP MVC Framework in Just 1 Hour | Intermediate
45:55
Coding with Pixel Fix
Рет қаралды 2,2 М.
Create a PHP Application | PHP MVC Project Tutorial
1:41:40
Dave Gray
Рет қаралды 50 М.
Laravel PHP Framework Tutorial - Full Course for Beginners (2019)
4:25:05
freeCodeCamp.org
Рет қаралды 2,4 МЛН
PHP Programming Language Tutorial - Full Course
4:36:39
freeCodeCamp.org
Рет қаралды 3,9 МЛН
Tuna 🍣 ​⁠@patrickzeinali ​⁠@ChefRush
00:48
albert_cancook
Рет қаралды 148 МЛН