Really Simple CRUD Operations Tutorial with PHP and MySQL

  Рет қаралды 32,693

Tony Teaches Tech

Tony Teaches Tech

Күн бұрын

Пікірлер: 116
@lensofstags
@lensofstags 9 ай бұрын
Thanks for actually taking time to explain what is happening rather than just playing background music and showing it all at 1.5x speed
@Mathilq-lv9sr
@Mathilq-lv9sr 9 ай бұрын
I wish my univ teacher explained it this way instead of complex codes and advance topics. You're saving me from college! thanks a lot!
@kayegalon864
@kayegalon864 Жыл бұрын
THANK YOU SO MUCH!!!!!!! This is the most basic tutorial I was looking for! Straight to the point, no more any other other codes or whatnot that I don't even understand the purpose of cause, again, I still haven't grasped the basics which is what I came to the tutorial for. Such a huge help to actually get me started. Thank you!
@leonvanrijswijk8409
@leonvanrijswijk8409 3 жыл бұрын
Great. Back to basics. Very well explained. With great frameworks like Laravel, we tend to forget the basics. Thanks.
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Appreciate it Leon
@jtt1117
@jtt1117 3 жыл бұрын
Excellent tutorial on basic CRUD operation in PHP and MySQL. Very helpful introduction to CRUD. Thanks.
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Glad it was helpful!
@MyStudio-io3so
@MyStudio-io3so 3 жыл бұрын
I am a bit confused as to how this video is not at a million views. This is just what I have been searching for. I have been looking for something like this for many weeks. I am building a website that I want the client to update their own info but only when they log in. I wanted the post and update to be one in the same. You addressed that by making the update and read target the same content. Thanks a lot. This is going to be added to my subscription. If you get the time can you do a video on how to make the CRUD buttons like edit button and update buttons etc. appear only when a user log in. This will be the closest anyone can get to making a really simple straight forward CMS. Thanks again for this video. I just subscribe.
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Hi Andy, I really appreciate the subscription, feedback, and kind words! It would help tremendously if you could share the video with others who my may thing would benefit from it :) I like your idea about building login functionality. I will add it to my list of future video ideas.
@nick8292
@nick8292 3 жыл бұрын
Excellent tutorial. Just what I was looking for among the vast amount of videos on this topic.
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Thanks Nick!
@zb2747
@zb2747 Жыл бұрын
Man thank you! Been looking everywhere for good tutorials that are simple and to the point.
@TonyTeachesTech
@TonyTeachesTech Жыл бұрын
You're welcome!
@chris2pple1
@chris2pple1 3 жыл бұрын
Very good work, Keep it up , You are better in explaining than most of the professionals because you include also the details of the logic in my opinion. Best regards from an Expat living in Germany
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Thank you very much Christian
@patrickpuma
@patrickpuma 3 жыл бұрын
Everyone should watch this!
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
Thanks Patryk!
@rizalaz
@rizalaz 3 жыл бұрын
Excellent work! after so many months it is still very useful to go back to the basic
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Thanks!
@jkc6869
@jkc6869 2 жыл бұрын
This is really great, the best video on crud, really appreciate how you literally went step by step with through explanations. Got yourself a new subscriber.
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
Much appreciated!
@l3tplayer
@l3tplayer 3 жыл бұрын
Man you are a legend. I watched soo many Tutorials, and finally, yours worked. Your explaination is damn good. Best Regards from Germany :)
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Thank you very much!!
@l3tplayer
@l3tplayer 3 жыл бұрын
@@TonyTeachesTech no problem!
@mrtn
@mrtn 3 жыл бұрын
wtf why do u have this low amount of likes and subs? u deserve like 100K+
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Really appreciate that 🙏
@adhankharisma7546
@adhankharisma7546 2 жыл бұрын
thankyou tony. Simple explanation to understand for a noob like me.
@zb2747
@zb2747 Жыл бұрын
Man would love for you to do a complete no bs tutorial on PHP from start to finish including docker and apache or ngnix. The amount of resources on youtube covering these topics in depth are slim.
@TonyTeachesTech
@TonyTeachesTech Жыл бұрын
Will consider it. I already have a bunch of apache and nginx setup videos. No php or docker yet
@TekkenRoom
@TekkenRoom Жыл бұрын
Master you are a genius 🙌🙌
@Mr3tibi
@Mr3tibi 2 жыл бұрын
Really thaaaaaaaaaaaaaaaaaaaaaaaaaaank you Explain step by step and simplify the information
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
You are most welcome
@JoshIbbotson
@JoshIbbotson 2 жыл бұрын
Tony, I have been looking everywhere for a video like this, so I could understand how to add a database to the stuff i was making with html, css and js This was so simple, thanks a lot!
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
You're very welcome Josh
@doodahgurlie
@doodahgurlie 10 ай бұрын
So the comments about not passing unsanitized variables to mysql...how would you do this for a production environment? Do you have an updated video that demonstrates this?
@mikeattewell3713
@mikeattewell3713 11 ай бұрын
Hi Tony, I followed your static tutorial on CRUD and it doesn't work for me. Did you miss a step in that where the form needed a manual POST? I know Elementor automatically does this but could you reply please. I am with Hostinger and I cant seem to get the database populated with results. Send me a PM if you want to help me please and we can setup a Zoom or similar to run through the code with you. Obviously I have expanded it for my site. Thanks in advance.
@patriksplayzone2670
@patriksplayzone2670 2 жыл бұрын
Thank you so much!
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
You're welcome!
@rafi_45
@rafi_45 2 жыл бұрын
thank you my man.
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
You're welcome!
@SergioArze
@SergioArze 2 жыл бұрын
Excelent !!! very well explained
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
Thanks!
@faisal.fs1
@faisal.fs1 3 жыл бұрын
Congrats! You got a new subscriber!!
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Thanks for subbing! :)
@talentkwiripi
@talentkwiripi 3 жыл бұрын
Great tutorial
@Enzo-sp3bf
@Enzo-sp3bf Жыл бұрын
Will there be any code different when deploying to server using PHP8 ? I can run these code on a PHP5.4 Mercury Server, but either in localhost or Azure (PHP8.0), the frontpage loaded successfully, but then when I press "add", localhost return error 500, and Azure return 404....They just can't find the create.php script
@veverett24
@veverett24 Жыл бұрын
Ive enjoyed the Vid on CURD , But I can't understand why when submitting form data the code from the create.php file is displayed in browser . is this a file permission or ownership causing this problem.
@saramartinezveiro
@saramartinezveiro 3 жыл бұрын
Thank you!!! It helped me a lot!
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Glad it helped!
@TitidanLila
@TitidanLila 3 жыл бұрын
Thanks Tony.. more, more, more pls..
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
You got it! More to come :)
@romulosendoromulo
@romulosendoromulo 3 жыл бұрын
Man, thank you very much for this! Seriously
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
You bet!
@funlandhq
@funlandhq 3 жыл бұрын
Great! Thank You so much
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
You're welcome!
@itsnariah
@itsnariah 3 жыл бұрын
hi, i am beginner to this php and I just want to ask if I can use phpmyadmin? or not?
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Definitely!
@roryboyes2307
@roryboyes2307 2 жыл бұрын
I really appreciate your style of teaching, but at the same time, I don't think you should assume I would have vim installed etc. I am not comfortable in the terminal. I enjoy the approach but found myself tripping up when you used shortcuts & I wasn't sure if I should stay in the terminal of just switch to vscode. I've given you a sub either way as I could see myself learning from this channel. Thanks.
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
Yes sorry about the oversight with vim. It's my go-to, but I know a lot aren't familiar with it. You certainly have the right idea of using whatever text edit that you're most comfortable with. Thank you for your subscription Rory!
@nonoluzincourt3125
@nonoluzincourt3125 3 жыл бұрын
Great tutorial. Thank you. Everything works for me except it keeps giving me an error in the index.php when you put if ($row['id'] == $_GET['id']). It keeps saying that Notice: Undefined index: id. I do not know why. Can you help please?
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Do you have the hidden input tag on line 12 of read.php which defines "id" for POST and GET requests? _echo '';_
@k-key3922
@k-key3922 3 жыл бұрын
The same problem here, bro. Did you solve it? Thanks
@jkastle
@jkastle 3 жыл бұрын
@@TonyTeachesTech I have that tag and it is still showing up
@jkastle
@jkastle 3 жыл бұрын
I found the fix if(isset($_GET['id']) && $row['id'] == $_GET['id'])
@teragigamega5183
@teragigamega5183 3 жыл бұрын
@@jkastle Thank you!
@rexmontero6494
@rexmontero6494 3 жыл бұрын
Thank you it works properly, but I got an error of: Warning: Undefined array key "id" in C:\xampp\htdocs\practice_php ead.php on line 7 Warning: Undefined array key "id" in C:\xampp\htdocs\practice_php ead.php on line 7 by using of phpMyAdmin and Visual Studio.
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
It would be best practice to check if the key exists first before accessing it. This may make the warning go away: www.w3schools.com/php/func_array_key_exists.asp
@AFuller2020
@AFuller2020 3 жыл бұрын
I am getting the same error, I checked the "read.php" file for the hidden input, it's there, still not working...>>echo '';
@thishandharmakeerthi5327
@thishandharmakeerthi5327 3 жыл бұрын
@@TonyTeachesTechI got the same error too. As we get the id by $_GET[ 'id '] method, i think we cannot check that variable exist or not. I use following method, I store id in a variable named ID $ID = $_GET['id']; Then i used the same if statement as follows if (isset($ID)&& $row['StudentId'] ==$ID ) As i searching for an variable not exists It gave me the same error :( Undefined index: id in C:\wamp64\www\phpCrud\Files ead.php on line 6
@Azyro777
@Azyro777 2 жыл бұрын
maybe everyone have solved this issue, for those whom getting this error, we could check the value of $_GET['id'] array first (as Tony suggest) likethis : if(isset($_GET['id']) && $row['id'] == $_GET['id'])
@jkc6869
@jkc6869 2 жыл бұрын
@@Azyro777 hi Oryza, can you please explain your solution little more. I have the same issue as everyone else on the undefined array key "id" on line 7. the solution you proposed, are we suppose to use that if statement instead of the one Tony provided? Thanks.
@liannvns
@liannvns 3 жыл бұрын
Thank you so much for this tutorial. It helped me a lot! I just have a question. How would you connect to a Javascript script for the frontend. Is it possible to do also in the simplest way? Best regards.
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
You can easily include a javascript file in your HTML page www.w3schools.com/js/tryit.asp?filename=tryjs_whereto_external
@calebvance4774
@calebvance4774 3 жыл бұрын
This was solid
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Thanks Caleb
@JuanitO_o
@JuanitO_o 2 жыл бұрын
i get undefined index id on the read.php file any help?
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
That's definitely a viable option
@jhunalfi
@jhunalfi 2 жыл бұрын
why on me at 22:00 , when refresh me found error "Undefined array key "id" in .. ead.php on line 7 " i think because the _get can't get their variable, how do i fix it?
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
Were you able to fix this?
@a1appbuilder
@a1appbuilder 2 жыл бұрын
Everything started fine then I added the update information and I get: Warning: Undefined array key "id" in D:\Document\Programming\Localhost\Test New\CRUD\API\Chrud 2 ead.php on line 10 I checked the typing over and over and I can't see the problem. I know so little about any other language except visual basic. this is the read.php file
@0brycefury
@0brycefury 3 жыл бұрын
Very incentive video. thanks a lot. but i have a little problem despite copying the exact same code: the form disappears when I add read.php!? How and why, i can't explain. I just have the h1 & p on the browser. Please help, I really want to solve this!
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Hmmm, I'm not sure why that would happen either
@0brycefury
@0brycefury 3 жыл бұрын
Might be my mistake, checking line by line just to be sure. I use the firefox developer edition browser, but it's also the same on chrome....
@laci272
@laci272 3 жыл бұрын
Uff, Tony, I get what you're doing, but passing unsanitized variables to mysql is a big no no, especially in a tutorial, where people don't know better. If you are not making the code secure, don't call it full, and add some disclaimer that this should not be used live, cause people will be pissed when their sites get hacked.
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
I understand your point, and it's very valid! I can add a disclaimer to the description
@devanmarcal4928
@devanmarcal4928 3 жыл бұрын
Hey Laci, what do u suggest to do? How to 'sanitize' the variables?
@laci272
@laci272 3 жыл бұрын
@@devanmarcal4928 We don't use mysqlI anymore, if you're using PHP, look into prepared statements. They are very easy to use once you 'get' them. Basically, you create a prepared SQL statement like 'select * from table where column=:id' or 'select * from table where column=?' (almost the same thing) and then, add the variables after like id="anything that's passed from the internet like 2;delete table" :) and PHP/mySQL will know that you want to add a variable and will escape it correctly no matter the input.
@devanmarcal4928
@devanmarcal4928 3 жыл бұрын
@@laci272 thanks for the information. As a begginer, I'm not quite familiar with all the terms, but I will study them to (try to) protect my data, but I think I got what you saying.
@AFuller2020
@AFuller2020 3 жыл бұрын
Big deal, it's free training, get over it.
@fahmikamal2435
@fahmikamal2435 3 жыл бұрын
how to make popup that ask user the confirmation when user want to delete data? thanks
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
You can do this with a JavaScript alert or confirm dialog box. I'll have a video about this soon
@fahmikamal2435
@fahmikamal2435 3 жыл бұрын
@@TonyTeachesTech ok sir. thanks for the respond.
@JuanitO_o
@JuanitO_o 2 жыл бұрын
also my save button doesnt apply the changes even tho i have the same code
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
It should if you have the same code
@JuanitO_o
@JuanitO_o 2 жыл бұрын
@@TonyTeachesTech its alright i fixed it , i need to use crud for an assignment of my college , i ended up figuring it out
@jonathanruiz397
@jonathanruiz397 2 жыл бұрын
@@JuanitO_o How did you fix it?, I have that problem.
@JuanitO_o
@JuanitO_o 2 жыл бұрын
@@jonathanruiz397 i have a friend who has finished his degree and i got no clue what he did to help me
@fahmikamal2435
@fahmikamal2435 3 жыл бұрын
why my textbox become shrink when i click update button?
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
What?
@fahmikamal2435
@fahmikamal2435 3 жыл бұрын
@@TonyTeachesTech sorry my mistake. i miss one tags in my code and thanks for the reply 🥳
@yt.user-zull
@yt.user-zull 3 жыл бұрын
6:59 Correction: That argument is not the table's name but that is the database name to which the website will connect.
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Yes, you are right! Thanks :)
@theycallmekingmo
@theycallmekingmo 3 жыл бұрын
Hello Tony can i get your email to reach out for more help?
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
I don't offer personal consulting, but for general questions, you can reach out to me on my contact form tonyteaches.tech/contact/
How to do Simple CRUD Operations in WordPress with Elementor
36:42
Tony Teaches Tech
Рет қаралды 55 М.
За кого болели?😂
00:18
МЯТНАЯ ФАНТА
Рет қаралды 1,9 МЛН
бабл ти гель для душа // Eva mash
01:00
EVA mash
Рет қаралды 9 МЛН
When Cucumbers Meet PVC Pipe The Results Are Wild! 🤭
00:44
Crafty Buddy
Рет қаралды 30 МЛН
Signup and Login with PHP and MySQL
43:16
Dave Hollingworth
Рет қаралды 288 М.
you need to learn SQL RIGHT NOW!! (SQL Tutorial for Beginners)
24:25
NetworkChuck
Рет қаралды 1,6 МЛН
Save HTML Form Data to a MySQL Database using PHP
24:38
Dave Hollingworth
Рет қаралды 211 М.
I Can't BELIEVE They Let Me in Here!
23:37
Linus Tech Tips
Рет қаралды 397 М.
PHP CRUD   || Create, Read, Update, Delete.
53:07
Step by Step
Рет қаралды 1 МЛН
Image CRUD In PHP & MySQL | CRUD With Image Using PHP MySQL
11:55
David G Tech
Рет қаралды 13 М.
Crud Operation in PHP | PHP Crud Operation with MySQL
35:53
Code With Yousaf
Рет қаралды 7 М.
Learn Database Normalization - 1NF, 2NF, 3NF, 4NF, 5NF
28:34
Decomplexify
Рет қаралды 2 МЛН
За кого болели?😂
00:18
МЯТНАЯ ФАНТА
Рет қаралды 1,9 МЛН