23 | UPDATE & DELETE Database Data Using PHP From Your Website! | 2023 | Learn PHP Full Course

  Рет қаралды 23,715

Dani Krossing

Dani Krossing

Күн бұрын

In this PHP tutorial I will teach you how to UPDATE and DELETE database data using PHP from your website! 🙂 Being able to update and delete data from your database directly from your site, opens up a lot of cool opportunities and features you can do in a website, and is one of the milestones most people look forward to reaching when it comes to PHP.
➤ TIMESTAMPS
00:00:00 - Update and delete HTML forms
00:01:12 - Creating the include files
00:01:38 - Creating the userupdate.inc.php file
00:05:27 - Creating the userdelete.inc.php file
➤ GET ACCESS TO MY LESSON MATERIAL HERE!
First of all, thank you for all the support you have given me!
I am really glad to have such an awesome community on my channel. It motivates me to continue creating and uploading content! So thank you!
I am now using Patreon and KZbin Memberships to share improved and updated lesson material, and for a small fee you can access all the material either from my memberships or Patreon, depending on your preference. I have worked hard, and done my best to help you understand what I teach.
I hope you will find it helpful :)
Memberships: / @dani_krossing
Patreon: / mmtuts

Пікірлер: 35
@tadeob_UB
@tadeob_UB 11 ай бұрын
Thank you so much for these tutorials. I have gotten into PHP using your videos and I’ve watched so many already to incorporate them in my projects. You are a big inspiration!
@isidoramita3286
@isidoramita3286 25 күн бұрын
Thankyou so much. Now I know how to connect my website to a database.🙏
@downpp2255
@downpp2255 11 ай бұрын
So handy, so easy to follow and soo easy to understand. Hope more people can find your channel!
@edunjobiemmanuel4200
@edunjobiemmanuel4200 11 ай бұрын
Thanks Kross. Your tutorial is really helpful
@kasunkumarasinghe6365
@kasunkumarasinghe6365 10 ай бұрын
thanks dani, you are teaching almost everything a learner should know.
@Izkawi33
@Izkawi33 11 ай бұрын
You are the best php teacher go ahead and upload videos daily then we need a course how to protect the website .
@alandslemany8788
@alandslemany8788 11 ай бұрын
Dude your videos are definitely top, and next week I have a PHP exam please upload the videos as fast as possible❤
@ezekielu7776
@ezekielu7776 Ай бұрын
most clean tutorial in 2024, I'm impressed.
@grimmjow6398
@grimmjow6398 8 ай бұрын
sir, I Love your tutorials it greatly helps me on my study on php to prepare for my college course subjects, thank you.
@dahyun8664
@dahyun8664 11 ай бұрын
Waiting for next ep!
@Athenaive
@Athenaive 2 ай бұрын
thank you friend
@user-ih2zp9jg7f
@user-ih2zp9jg7f 24 күн бұрын
Thanks you for your explanation. Is there also a way to fetch the database data automatically into an html table, using pdo?
@josueortiz9309
@josueortiz9309 4 ай бұрын
Thanks Dani! I have a doubt ... when I try to update the user and hit update it completes the try and everything seems to be ok, but when I see the database it doesn't delete the record, but delete the data inside the cells of the table.
@HaiderAli-zo9ff
@HaiderAli-zo9ff 11 ай бұрын
Dani Sir Please upload videos daily.... waiting for next
@Ghareebz
@Ghareebz 11 ай бұрын
Dani sry for that but what would you take for a Carrer if you have the choice Game Dev or Web Dev
@Dani_Krossing
@Dani_Krossing 11 ай бұрын
I mean objectively the web dev path has better opportunities, and less risk involved if you want a solo career. Subjectively, I would love to work with games, but it would require more knowledge in that field on my end, and it’s a much too risky path for me to be comfortable with it as a career. I’m a self taught game dev, but actually have a bachelor’s in web dev. 🙂 which realistically at this point also makes it a better choice for me personally, since I yet don’t have the skills to get hired in a game company. But if you are looking for an objective answer, then web dev is the more stable industry. 🙂
@Ghareebz
@Ghareebz 11 ай бұрын
@@Dani_Krossing thanks 🙏❤️
@Trunk_Tech
@Trunk_Tech 7 ай бұрын
Can we get a pop up or something saying that the update or delete Successfully 😁😁 am just being curious or something..
@Izkawi33
@Izkawi33 11 ай бұрын
Dani why you put number 2 directly in the update statement you have to put it ? or named parameter then bind it with bindParam method with other arguments
@Dani_Krossing
@Dani_Krossing 11 ай бұрын
It's because that 2 isn't data that was submitted by the user. 🙂 It is only user data you need to protect against.
@Izkawi33
@Izkawi33 11 ай бұрын
@@Dani_Krossing you mean we put only the passed data in parameters and any direct data we put it in the script no need to put it in a parameter
@Dani_Krossing
@Dani_Krossing 11 ай бұрын
ANY data submitted from the HTML form, HAS to be replaced by a parameter in the query, and be submitted separately using the bindParam(). 🙂 Even if it is data that we created and submitted using a hidden input in the HTML form, since the user can manipulate that data using the build in developer tool in the browser. Any data that we add directly inside our PHP script, does not need to be a parameter, since the user doesn't have access to that, and didn't have an opportunity to "attack us" using that data. 🙂 Because I added the "2" inside the script directly, the user never had a chance to "mess with it". So therefore it is safe.
@FafajojoFafajojo
@FafajojoFafajojo 10 ай бұрын
Hi, I'm an Iranian student and I can't speak English well. I can't connect my database to php, and in the next output, when I click on the button, it prints from setAttribute to the end of the php tag as an error. Can you help me?
@arielp7582
@arielp7582 7 ай бұрын
Is the info inside your $dsn variable correct?
@mejbahahmed9780
@mejbahahmed9780 7 ай бұрын
Sir Give us laravel 10 tutorial pls
@brianjay9357
@brianjay9357 Ай бұрын
i was following the previous lesson and managed to insert data to my database but now it is submitting empty data in the db table even if i have entered data to the form. what could be the reason ?
@Dani_Krossing
@Dani_Krossing Ай бұрын
It means that your code on the next page, after submitting the form, isn't getting the data. Which means there is a typo in your code there. :) You are welcome to share the code here, if you can't find the typo.
@brianjay9357
@brianjay9357 Ай бұрын
@@Dani_Krossing would the typo be in the form handler?
@FafajojoFafajojo
@FafajojoFafajojo 10 ай бұрын
I want to create a database for user comments
@niyaziguven7124
@niyaziguven7124 7 ай бұрын
When I update the information only the e mail gets updated. username and pwd gets deleted. Does anybody else have this problem. Anybody knows why this might be happening?
@niyaziguven7124
@niyaziguven7124 7 ай бұрын
I just figured that having the formhandler in the same directory is causing the issue. I deleted it from the directory and it is fixed.
@siphesihlemathe7179
@siphesihlemathe7179 2 ай бұрын
I did that but no change@@niyaziguven7124
@mohammedalbraih6233
@mohammedalbraih6233 11 ай бұрын
yeah, forgot to mention getting a haircut :)
@Dani_Krossing
@Dani_Krossing 11 ай бұрын
I mentioned it at the start of the last episode 😉 I had to get it for health reasons
@mohammedalbraih6233
@mohammedalbraih6233 11 ай бұрын
@@Dani_Krossing I might have missed it🫣 since I watched about most of your content. Not gonna lie your videos are a lot more beneficial than what some universities teach us. Got a full score on a project thanks to you. Stay safe and healthy buddy.👍🏻👍🏻
How I prepare to meet the brothers Mbappé.. 🙈 @KylianMbappe
00:17
Celine Dept
Рет қаралды 54 МЛН
WHY DOES SHE HAVE A REWARD? #youtubecreatorawards
00:41
Levsob
Рет қаралды 35 МЛН
ХОТЯ БЫ КИНОДА 2 - официальный фильм
1:35:34
ХОТЯ БЫ В КИНО
Рет қаралды 2,4 МЛН
MySQL: How to UPDATE and DELETE data from a TABLE
3:32
Bro Code
Рет қаралды 55 М.
How to update/edit data into database using PHP MySql
19:17
Funda Of Web IT
Рет қаралды 125 М.
RAG + Langchain Python Project: Easy AI/Chat For Your Docs
16:42