Call me crazy, but this was clear, concise and staightforward. You could easily split this up into separate files, would have to revise some of the potential vulnerabilities - et voilà, a performant, state-of-the-art app. No mixing of frontend, backend, no mashup of code, markup and styling the way React (including Next Js) and the like do. Didn't really have to stop the video at any point, since everything was so refreshingly self-explanatory. I SO wish knowledge of core web functionalities could still land me a job in 2024. Oh well, go ahead, crucify me
This was very much how you would write PHP way back in the days. Simple and quick to do, but becomes quickly hard to maintain when your application grows. Stuff like this haunts me in my dreams haha. Anyways, great video!
I did that in my final exam, I broke them up in different files and require_once them but it was one procedual block of code executed under the same index.php :D
@@xorxpert In a professional setting, yes. Your hobby project that you won't finish and just wanna MVP? no. It all depends on the circumstances around what you are building.
I'm a database guy who sometimes has to create CRUD apps for internal users. This approach suits me just fine. In fact, it solidifies my thinking that the app supports the database and not the other way around. They are no different than my ETL scripts in that a UI is still a interface my data integrates with.
Thanks for this video! Just getting into React Native, at my fourth semester as a Software Engineer. I love videos as these that goes into explaining new upcoming stuff that may become relevant at some point!
A couple of area's you can fastly improve the readability of this is to abstract certain functionality away into functions. Which you can collapse in your editor. This can even be done with the HTML. To echo your HTML, if I remember it correctly you simple open the close the PHP brackets, write HTML and open the HTML brackets again at the end of the function. Additionally I would create use environment variables, and create a function to get the DB connection, where it lazy loads the connection. This will ensure only a DB connection is created when it's needed.
Please create a vídeo, applying a some refactor startegy, with some problems or include a new feature, will be a great video to teach "why refactor?" Great video
Love this video! It may not be optimal, but starting a project as a single giant php file helps me focus on the actual logic of the application. Then while I write, I can optimize redundant and unsafe code only when it makes sense to do so, instead of adopting solutions and paradigms just for the sake of it.
The frameworks mostly add quick ways of doing things, but at the cost of code you don't understand or even know exists. The years of developing the core PHP have given us tools to build real sites easily. Yes, you could do all of your sites in one file, but breaking it into a few small files isn't bad either if you stick to the lower-level built-in tools. I have a PHP framework that worked out with minimal extra code I didn't write, which gave me a lot of flexibility, and it works now 10 years later.
Good video! Kudos to showing that the PHP is here to stay! You can also use object oriented classes, or use functions in an old procedural style, all in one index.php
This brings me back to how I wrote many apps in PHP, lol. Great reminder of how many abstracts we now have with all the web frameworks. Fun watching this and building out my own single page php app again!!! Thank you for the flashback ;)
If you are not doing single index.php currently and are not able to monetize, moving to developing this way won't change a thing. This is something that works for Pieter Levels, but changing the way you work won't give you automatic success. We all developped like this this 25 years ago, there are also big downsides to this. Nice video
I've personally never used PHP. But seeing how easy it was to create an entire coffee shop application in literally ONE file, with hot reload and a ton for standard functions, I think I might use PHP for future little projects :P
The most cringey thing for me is this is 100% better than some stuff I probably wrote in the past! 😂 But I agree with your overall point -- this is a wonderful video that provides some much needed perspective.
Great video and commentary. Built my first app a few years ago using plain vanilla php and bootstrap and it worked great, then somehow i got convinced it was badly written (well it kind of was really), but instead of improving the existing code i completely dumped it and rewrote it from scratch using Laravel (and tailwind). The rewrite works great, but i wish i havent turned to Laravel or any other framework. The code is now harder to understand, too much "magic" and opinionated ways kind of takes the fun of coding for me. It also introduced to me the pain of keeping the framework and its dependencies updated. I kind of dislike working on that code, same with other frameworks such as Django.
The best way to learn web development as a beginner is rhis way with PHP. No deep abstraction. After you can learn how to move some parts in order to make the code more maintainable and readable.
@@florisvandenberg7424 Also, contributing to existing frameworks. To get framework level understanding, it certainly helps to write one and use it for a few years on multiple projects (since reusability and modularity is fundamental to frameworks). With that foundational knowledge though, it enables you to better understand how to contribute to one as well. Or just start using an existing one immediately but get under the hood and figure out how it works; edit it, change it, see what works and what doesn't. 😁
I do things like this all the time. It is all about the data that is being passed. Going the straight PHP and vanilla javascript way improved how I maintain code through how to structure everything.
It looks like the web dev industry is undergoing a moment of deep reflection. Many devs are beginning to realize that most of the products they ship are over engineered, have unnecessary complexities and that we have tools that have less hype yet can deliver just as good as the tools they were introduced to in their bootcamps (oh yes some of these shiny tools are the product of Bootcamps that teach you that Language X/Library X/Framework X is the one and only true way to build applications.)
Yep! I been in this thing from the start in the mid-90s. It's like this for real... 1995, 1996, 1997, 2022, 2023, 2024. Once HTMX-like functionality is added to the browser web development shall be fun and free again. Till then, just add HTMX and free your mind and time. Exercise and sleep more!
Single file php is going too far in the other direction. Splitting routes into separate files is a big boost for readability at almost no cost I dev time.
All of that assumes that what you see in this video is an actual good idea, which it isn't. All of the people talking about "bloated overengineered node_modules wtfjs" fail to realize that there is no difference between engineering and overengineering. The real enemy is underengineering, with which you get insecure protocols like SS7 and BGP, incomplete languages like JS and PHP, and bad programmers thinking "no frameworks/dependencies" is something you should be proud of.
@@okie9025 The web has existed longer than these frameworks and dependencies that people worship. In fact more and more developers are beginning to question the "accepted" way of doing things. And thanks to AI when anybody with a brain will be able to build a web application, these libraries, frameworks and tools that you all worship will now be what they are supposed to be; just tools.
@@pythonantole9892 I'm not sure where you get this notion of people "worshipping" tools. They've always been tools, nobody is saying otherwise. I've seen this with "no-framework" purists before; they think there is some sort of webdev cult where people purposefully hurt themselves by using slow and complicated frameworks simply for the lols, then complain to others why they're not doing the same. I've never seen what these people often say is practically every web developer. In my experience, the only delusional people are the aforementioned purists, which would rather break a leg reinventing the wheel than install a single dependency. There are legitimate reasons not to use dependencies or the newest frameworks, but rose tinted glasses or imagined supremacy are not it.
But with a small amount of work, almost all of that inconvenience is eliminated. You can easily split this into separate files for each view or route and simply rely on the web server for routing. Or you can build your own router. I mean, you can even build your own router in a single-file site like this.
This can be good and *way* easier to read and navigate if you extract all the HTML files out and use file_get_contents instead. Wouldn't be a single file anymore but much more maintainable.
Abstract the views to simple .php files and use include/require statements. PHP itself is a templating language and you can pretty easily implement a simple MVC-style app this way (that was what we did decades ago).
@@patricknelson Why .php files? I've found it easier to use HTML files, while doing all the PHP logic in the main PHP file. If you're suggesting that all the templating stuff be done alongside the HTML, that's a bit oldskool, hard to read and difficult to work with. Much better to separate PHP and HTML 100% IMO
You know what you can also do? Serve an angular application from a php page. Make your server view the index.html as a php file and have htaccess for permissions. Used to use this method to serve angular full stack applications.
Exactly. This is fine for a side project or if you are going to be the only developer. Its maybe even preferred! Fancy frameworks and design patterns come into play when you want to scale the project such that an entire team or organization can work on it. I think people misunderstand this. Especially the scalability part (it's more about enabling multiple developers to work concurrently, than performance). That said, it's also fine to use overkill design patterns and frameworks on your side project, if the goal is learning for your main job.
Nobody says that it isn't possible. For very small Websites it might even be a reasonable approach. The problems arise when the site becomes bigger and bigger with ever more features and a dev team of 30 working on it. A single php file becomes completely unmaintainable at that point.
I checked out the repo on his github (orl-coffee) and this is definitely a "build it and forget it" sort of project, lol. Maintaining this would be a nightmare without a little abstraction. For example: Client may ask to change location to separate fields so we can perform zip code validation. That single "location" field is spread out in multiple spots and you have to manually deduplicate that from the header responses (also in the same monolithic file) which use the "Location: ..." header. Now take that and multiply that many times over _and_ spread that out over multiple years (as you forget how you originally built it) and/or multiple developers with differing approaches to things or a similar lack of understanding to the original approach.
Hi, thanks for the video. However, i also watched that interview, i dont think that he means literal single index.php. If he did that way i dont believed. Because for example, you omit, or at least i did not catch, how you apply the mode rewrite, even you indicate the document root, Or are you using ngnix for redirect all the traffic for index.php without a need of htacces in of apache server? All frameworks point out all traffic to a single public index. And like i read in the comment, at least use PDO, which exist since PHP 5.1 with prepare statements and naming placeholders to avoid sql injection. To validate if is a int you should use filters of type validate ( dont mix up with filterss for sanitize) for that, because is_numeric is not reliable not even is_int and even to other kind validation. No need for list function, just use similar to js, just see the syntax on official docs. Please use short echo and with escape html. That global keyword is killing me 🤣 And to finished dont forget csrf token. 😱 Because of videos like this that people make fun of it. 🤧
I have a 35000 line php file from 2010 that's a fully working comnersally sold back then CMS system and site thiscwas the first thing I build for someone else bad times but it worked
This only good if you are working for your own project/startups. This didnt work in company i guess. I use to enjoy this type of coding back days with some spaghetti code, mixing functions , client code, and everything, this is what PHP are good for.
I'm starting with php and find this quite insteressting since there are a ton of frameworks which are kinda overwhelming for me as a starter! Can somebody name the theme/font which is used in this video? :)
this only works if you redirect all routes to index.php, if such directory or file doesn’t exist. this is how i create single/dynamic pages with apache
This was how I learnt to program in PHP, the world of programming has changed so much. Sometimes it’s nice to go back to the beginnings and write code like you used to but with the enhancements you now know today.
so you said don't worry about anything to connect but this is very hard to follow if I don't know how you did what you did to make the php working. Use just said a docker I know but I am not following that or know how to use it
I have Recently Worked on a Similar Kind Of Project in Php For My Amazon Affiliate Pages. it's Cool website but do you mind sharing the source code of this i would like to make similar Demos and Improve myself
Wait a second. at about 3:30. how is this any different from Next.js' page.js and React's jsx? it's exactly the same thing! it's like after years of innovation Next.js just reinvented php?!
How do you have a single php file being accessed from multiple paths/URIs? I guess another way of asking that is what is the webserver that would be used to run this? I'm really only familiar with apache where the URI represents the literal file path on the server.
I think your video is kinda dangerous. Making a tutorial about an application in vanilla is fine, as long you don't omit basic security. There are many beginners out there who don't know about XSS and SQL-Injections and will follow along this style of writing code.
the true single page application.
biblical accurate single page application
"We got single page at home"
single file application
@Ryan-gf1sz This! Because in One file, we have Many Pages! ☺☺☺
This brings me back. This was the cool way to write PHP 20 years ago.
Facts 20 years ago this a whhole vibe lol, in 2024 thoughhhh, eye twitching lol
OMG yes I was 10 coding a PHP Javascript and MySql site from the ground up 💪
This was the only way I knew how to do it in 2013 🤣
20 years ago? I did the same thing in 2015 :v
@@lamontevlogs why? because it looks cheap?
Call me crazy, but this was clear, concise and staightforward.
You could easily split this up into separate files, would have to revise some of the potential vulnerabilities - et voilà, a performant, state-of-the-art app.
No mixing of frontend, backend, no mashup of code, markup and styling the way React (including Next Js) and the like do.
Didn't really have to stop the video at any point, since everything was so refreshingly self-explanatory. I SO wish knowledge of core web functionalities could still land me a job in 2024.
Oh well, go ahead, crucify me
You ain’t crazy. This guy’s code is far more readable than many trending frameworks’ codebase.
This was very much how you would write PHP way back in the days. Simple and quick to do, but becomes quickly hard to maintain when your application grows. Stuff like this haunts me in my dreams haha. Anyways, great video!
@@offskip_dave Skill issue. You failed at implementing proper page routing.
if you actually coded this way in the example video, you’re a horrible PHP dev
I did that in my final exam, I broke them up in different files and require_once them but it was one procedual block of code executed under the same index.php :D
@@xorxpert In a professional setting, yes. Your hobby project that you won't finish and just wanna MVP? no. It all depends on the circumstances around what you are building.
As someone who didn't really use php ever, this code looks very straightforwars and simple.
Loved it. Today we have more tools and it's easier to start but harder to finish.
I'm a database guy who sometimes has to create CRUD apps for internal users. This approach suits me just fine. In fact, it solidifies my thinking that the app supports the database and not the other way around. They are no different than my ETL scripts in that a UI is still a interface my data integrates with.
Reminds me of my PHP websites in my web development intro class in university lol, I'm glad we've all advanced past this.
Good old days, PHP is still one of my favorites 🎉 good content of course.
Thanks for this video! Just getting into React Native, at my fourth semester as a Software Engineer. I love videos as these that goes into explaining new upcoming stuff that may become relevant at some point!
A couple of area's you can fastly improve the readability of this is to abstract certain functionality away into functions. Which you can collapse in your editor. This can even be done with the HTML. To echo your HTML, if I remember it correctly you simple open the close the PHP brackets, write HTML and open the HTML brackets again at the end of the function.
Additionally I would create use environment variables, and create a function to get the DB connection, where it lazy loads the connection. This will ensure only a DB connection is created when it's needed.
Please create a vídeo, applying a some refactor startegy, with some problems or include a new feature, will be a great video to teach "why refactor?"
Great video
Love this idea.
Unfortunately I think one of the first things that will need to be done is to split the file into multiple files lol
Love this video! It may not be optimal, but starting a project as a single giant php file helps me focus on the actual logic of the application. Then while I write, I can optimize redundant and unsafe code only when it makes sense to do so, instead of adopting solutions and paradigms just for the sake of it.
The frameworks mostly add quick ways of doing things, but at the cost of code you don't understand or even know exists. The years of developing the core PHP have given us tools to build real sites easily. Yes, you could do all of your sites in one file, but breaking it into a few small files isn't bad either if you stick to the lower-level built-in tools. I have a PHP framework that worked out with minimal extra code I didn't write, which gave me a lot of flexibility, and it works now 10 years later.
Good video! Kudos to showing that the PHP is here to stay!
You can also use object oriented classes, or use functions in an old procedural style, all in one index.php
This brings me back to how I wrote many apps in PHP, lol. Great reminder of how many abstracts we now have with all the web frameworks. Fun watching this and building out my own single page php app again!!! Thank you for the flashback ;)
If you are not doing single index.php currently and are not able to monetize, moving to developing this way won't change a thing. This is something that works for Pieter Levels, but changing the way you work won't give you automatic success. We all developped like this this 25 years ago, there are also big downsides to this. Nice video
I've personally never used PHP. But seeing how easy it was to create an entire coffee shop application in literally ONE file, with hot reload and a ton for standard functions, I think I might use PHP for future little projects :P
This was amazing to watch. Would love to see more of these single page PHP apps. Thank you so much for making this.
The most cringey thing for me is this is 100% better than some stuff I probably wrote in the past! 😂 But I agree with your overall point -- this is a wonderful video that provides some much needed perspective.
Had no idea i could write php this way, now im gonna create my websites more easily and less chaos over the files
The good old days, really cool video ❤
Great video and commentary. Built my first app a few years ago using plain vanilla php and bootstrap and it worked great, then somehow i got convinced it was badly written (well it kind of was really), but instead of improving the existing code i completely dumped it and rewrote it from scratch using Laravel (and tailwind). The rewrite works great, but i wish i havent turned to Laravel or any other framework. The code is now harder to understand, too much "magic" and opinionated ways kind of takes the fun of coding for me. It also introduced to me the pain of keeping the framework and its dependencies updated. I kind of dislike working on that code, same with other frameworks such as Django.
Taking monolithic apps to a new level
The best way to learn web development as a beginner is rhis way with PHP. No deep abstraction. After you can learn how to move some parts in order to make the code more maintainable and readable.
Then write your own framework. I learned a lot about how frameworks work by creating one.
@@florisvandenberg7424 Also, contributing to existing frameworks. To get framework level understanding, it certainly helps to write one and use it for a few years on multiple projects (since reusability and modularity is fundamental to frameworks). With that foundational knowledge though, it enables you to better understand how to contribute to one as well. Or just start using an existing one immediately but get under the hood and figure out how it works; edit it, change it, see what works and what doesn't. 😁
I do things like this all the time. It is all about the data that is being passed. Going the straight PHP and vanilla javascript way improved how I maintain code through how to structure everything.
Does anyone know what font he is using in his editor? It feels easy on the eyes.
comic mono
It looks like the web dev industry is undergoing a moment of deep reflection. Many devs are beginning to realize that most of the products they ship are over engineered, have unnecessary complexities and that we have tools that have less hype yet can deliver just as good as the tools they were introduced to in their bootcamps (oh yes some of these shiny tools are the product of Bootcamps that teach you that Language X/Library X/Framework X is the one and only true way to build applications.)
Yep! I been in this thing from the start in the mid-90s. It's like this for real... 1995, 1996, 1997, 2022, 2023, 2024.
Once HTMX-like functionality is added to the browser web development shall be fun and free again. Till then, just add HTMX and free your mind and time. Exercise and sleep more!
Single file php is going too far in the other direction. Splitting routes into separate files is a big boost for readability at almost no cost I dev time.
All of that assumes that what you see in this video is an actual good idea, which it isn't. All of the people talking about "bloated overengineered node_modules wtfjs" fail to realize that there is no difference between engineering and overengineering. The real enemy is underengineering, with which you get insecure protocols like SS7 and BGP, incomplete languages like JS and PHP, and bad programmers thinking "no frameworks/dependencies" is something you should be proud of.
@@okie9025 The web has existed longer than these frameworks and dependencies that people worship. In fact more and more developers are beginning to question the "accepted" way of doing things. And thanks to AI when anybody with a brain will be able to build a web application, these libraries, frameworks and tools that you all worship will now be what they are supposed to be; just tools.
@@pythonantole9892 I'm not sure where you get this notion of people "worshipping" tools. They've always been tools, nobody is saying otherwise. I've seen this with "no-framework" purists before; they think there is some sort of webdev cult where people purposefully hurt themselves by using slow and complicated frameworks simply for the lols, then complain to others why they're not doing the same. I've never seen what these people often say is practically every web developer. In my experience, the only delusional people are the aforementioned purists, which would rather break a leg reinventing the wheel than install a single dependency. There are legitimate reasons not to use dependencies or the newest frameworks, but rose tinted glasses or imagined supremacy are not it.
Remembering the old days.
It’s like the PHP version of trying out a flip phone in 2024. It’s a nice nostalgia trip but it gets very inconvenient really really fast 😅
for 65k a month i dont care
But with a small amount of work, almost all of that inconvenience is eliminated. You can easily split this into separate files for each view or route and simply rely on the web server for routing. Or you can build your own router. I mean, you can even build your own router in a single-file site like this.
@@alexandrepellegrino2699 fair
@@haphazard1342 not gonna lie. I kinda want to do this myself. Just to see how spoiled I’ve become with all this Laravel goodness
For me it's fine. My site only gets 200 users max a year. lol
is it just me ( laravel beginner ) or writing vanilla php is drastically different from writing laravel code ? fantastic job btw man
In the Laravel world, you write Laravel not PHP lol.
Yea framworks for php are mostly Object-Oriented Programming
Laravel is mostly object-oriented so it is different, but you can add complexity if you need it in plain PHP and make it as abstract as Laravel.
github link?
I think its at aschmelyun orl-coffee
This can be good and *way* easier to read and navigate if you extract all the HTML files out and use file_get_contents instead. Wouldn't be a single file anymore but much more maintainable.
Abstract the views to simple .php files and use include/require statements. PHP itself is a templating language and you can pretty easily implement a simple MVC-style app this way (that was what we did decades ago).
@@patricknelson Why .php files? I've found it easier to use HTML files, while doing all the PHP logic in the main PHP file. If you're suggesting that all the templating stuff be done alongside the HTML, that's a bit oldskool, hard to read and difficult to work with. Much better to separate PHP and HTML 100% IMO
idk php yet but this video was extremely educational for some reason
I am an avid hater of PHP but this makes me realize why it caught on. So easy to understand. Weird, but simple
The only thing about the code you show is that it is so easy for users to gain access to the admin panel through very simple SQL injection.
Ufff, old times, , why do not using PDO ?
Old school as u said 😁
If you’re always going to use MySQL, why not?
mysqli is god send
Back to the old days👍
This is THE way I create applications. I hate many files, I merge everything I possibly can into 1 file.
your video opened my mind :)
i guess php is not as bad as it seems like!
You know what you can also do? Serve an angular application from a php page. Make your server view the index.html as a php file and have htaccess for permissions. Used to use this method to serve angular full stack applications.
Exactly. This is fine for a side project or if you are going to be the only developer. Its maybe even preferred!
Fancy frameworks and design patterns come into play when you want to scale the project such that an entire team or organization can work on it. I think people misunderstand this. Especially the scalability part (it's more about enabling multiple developers to work concurrently, than performance).
That said, it's also fine to use overkill design patterns and frameworks on your side project, if the goal is learning for your main job.
lovely. I don't know why people are scared of beginners making mistakes. that's how you learn.
The HTML doesn't seem to be written very semantically?
See that come to head in JS frameworks too. Semantics is aside to the main idea of this video.
footer 😜
@@Jabberwockybirdi see what you did there?
Nobody says that it isn't possible. For very small Websites it might even be a reasonable approach. The problems arise when the site becomes bigger and bigger with ever more features and a dev team of 30 working on it. A single php file becomes completely unmaintainable at that point.
I checked out the repo on his github (orl-coffee) and this is definitely a "build it and forget it" sort of project, lol. Maintaining this would be a nightmare without a little abstraction. For example: Client may ask to change location to separate fields so we can perform zip code validation. That single "location" field is spread out in multiple spots and you have to manually deduplicate that from the header responses (also in the same monolithic file) which use the "Location: ..." header. Now take that and multiply that many times over _and_ spread that out over multiple years (as you forget how you originally built it) and/or multiple developers with differing approaches to things or a similar lack of understanding to the original approach.
I like this for sure. Subscribed. would it be hard to make a PDO version of this? :)
Amazing video, subbed!
even though its clearly not very practical, I still think this is a cool thing to try 😋
I'm pretty sure Futaba Channel did this, right?
Can you help with the docker setup or maybe a GitHub link with the source code?
Great work. Retro style ))). But really educative
Hi, thanks for the video.
However, i also watched that interview, i dont think that he means literal single index.php. If he did that way i dont believed. Because for example, you omit, or at least i did not catch, how you apply the mode rewrite, even you indicate the document root, Or are you using ngnix for redirect all the traffic for index.php without a need of htacces in of apache server?
All frameworks point out all traffic to a single public index.
And like i read in the comment, at least use PDO, which exist since PHP 5.1 with prepare statements and naming placeholders to avoid sql injection.
To validate if is a int you should use filters of type validate ( dont mix up with filterss for sanitize) for that, because is_numeric is not reliable not even is_int and even to other kind validation. No need for list function, just use similar to js, just see the syntax on official docs.
Please use short echo and with escape html. That global keyword is killing me 🤣
And to finished dont forget csrf token. 😱
Because of videos like this that people make fun of it. 🤧
Which font is this?
I have a 35000 line php file from 2010 that's a fully working comnersally sold back then CMS system and site thiscwas the first thing I build for someone else bad times but it worked
Please can you do a video starting php using docker for those of us using ubuntu
Is it secured?
Your basic app + production + marketing == $1000/m company ❤💯
This only good if you are working for your own project/startups. This didnt work in company i guess. I use to enjoy this type of coding back days with some spaghetti code, mixing functions , client code, and everything, this is what PHP are good for.
Nice! Any chance to have a link to the source code please. I admire the simple integration of tailwind too. Thanks
That's what i normally use Python-Flask for single page web app for some prototype or demo.
I'll just say this: "Silence is golden". If you know you know lol
The key in Silence undetected.
--National Treasure
Nice video. Could u please tell me what font you u in this video?
I'm starting with php and find this quite insteressting since there are a ton of frameworks which are kinda overwhelming for me as a starter!
Can somebody name the theme/font which is used in this video? :)
Everybody goes back to Vanilla at some point. 🍦
Hey it’s really super, like this is that possible to build a multiple route API Using Php , kindly create a video in it if possible, thank you
Yeah, where is the repository? Is it hosted somewhere? 💻👨💻
Are you using tailwind?
nice video, but what is that vscode theme name ?
Wow I’m back in 2003 ! Good Ol’ Times 😂
Clearly it can be done but should it?
Wich vscode thmeare you using?
this FONT man, it hurts my eyes 😆
classic php developer font
font you use in vscode?
this only works if you redirect all routes to index.php, if such directory or file doesn’t exist. this is how i create single/dynamic pages with apache
I was just about to say that - this can't be done with a single index.php file, a .htaccess file is also needed for the routing
Hey, can I get this code for study
When we first created PHP scripts, we wrote everything in an intex file! Old tricks again in new times.
What is your font name?
This was how I learnt to program in PHP, the world of programming has changed so much. Sometimes it’s nice to go back to the beginnings and write code like you used to but with the enhancements you now know today.
Fun video.
I’ve been to all of those coffee shops. Orlando local 😅
so you said don't worry about anything to connect but this is very hard to follow if I don't know how you did what you did to make the php working. Use just said a docker I know but I am not following that or know how to use it
Vanilla PHP. Awesome!
is there somewhere to download this index.php ?
This is how I wrote my PHP back then.
Goodie old days🎉
Subscribed.
I have Recently Worked on a Similar Kind Of Project in Php For My Amazon Affiliate Pages. it's Cool website but do you mind sharing the source code of this i would like to make similar Demos and Improve myself
Hello, me! (in the late '90s)
Wait a second. at about 3:30. how is this any different from Next.js' page.js and React's jsx? it's exactly the same thing! it's like after years of innovation Next.js just reinvented php?!
yep
Yeah lmao, it comes full circle
components lol?
Ahhh good ol days
I wish you'd used PDO and not mysqli_ functions.
Nothing wrong with mysqli.
isnt it 2 files if you used a seprate css file????
How do you have a single php file being accessed from multiple paths/URIs? I guess another way of asking that is what is the webserver that would be used to run this? I'm really only familiar with apache where the URI represents the literal file path on the server.
look into .htaccess
Read about mod_rewrite in Apache
@@TheKris2X gracias
@@elijahbuscho7715If you’re using apache, there’s a simple re-write rule.
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.*)$ index.php?path=$1 [NC,L,QSA]
bro is the case god
what is it with the font ? 💀
what is the theme name?
Man, you sent me back to 2010, just missed jQuery
I think your video is kinda dangerous. Making a tutorial about an application in vanilla is fine, as long you don't omit basic security. There are many beginners out there who don't know about XSS and SQL-Injections and will follow along this style of writing code.
if you are the only one who knows about the security issues. does it really matter?
remember when we were allowed to have fun while coding?