Тёмный

How To Insert Data Into MySQL using PHP | PDO 

GTCoding
Подписаться 40 тыс.
Просмотров 31 тыс.
50% 1

In this video, you will learn how to insert data into a mysql database using PDO in PHP. PDO (PHP Data Objects) is a secure way to connect and execute tasks with the database.
Source Code: github.com/Godsont/Insert-To-...
Another advantage of PDO is that it works with a lot of popular databases. So, if at some point of time you want to change the database for your website, you can do that easily by just changing one line of code.
Here we are not using any object oriented way which can help keep code organized for large projects. I recommend you to try adding different tasks in this video to different functions and call the functions whenever necessary.
We are using MySQL database which is mostly used with PHP. We had designed and added validation to the contact form in the previous two videos. Please watch them if you want to know how to create a contact form.
Here are the links:
Design: • How To Design An Aweso...
Validation: • How To Add Form Valida...
If you liked this video please give it a thumbs up. Subscribe if you haven't already.
------------------------------------------------------------
Music from filmmusic.io:
"Tech Live" by Kevin MacLeod (incompetech.com)
Licence: CC BY (creativecommons.org/licenses/b...)

Опубликовано:

 

6 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 48   
@RameenFallschirmjager
@RameenFallschirmjager 4 года назад
I search a hell of time to find finally someone explaining this! Thanks, earned a subscriber!
@GTCoding
@GTCoding 4 года назад
Awesome, thank you!
@bits5109
@bits5109 3 года назад
Straight to the point. Thanks, worked perfectly!
@alixpro9336
@alixpro9336 3 года назад
Finally a perfect tutorial, BIG THANKS !
@Acousticsoul215
@Acousticsoul215 5 лет назад
You are an excellent professor!
@bonguthandokhumalo7552
@bonguthandokhumalo7552 2 года назад
Straight to the point, thank you so much!!!
@SimPwear84
@SimPwear84 4 года назад
Thank you so much, this was cool and what I needed for my project. Subbed!!
@eziochannel9373
@eziochannel9373 3 года назад
This code is actually works, thanks mate
@louieeee435
@louieeee435 3 года назад
Was referring to a video from 3 years ago that first popped up when I searched on how to do this and that video did not help me at all but when I found this video it all worked after trying 4+ hours to figure it out thank you sir!
@GTCoding
@GTCoding 3 года назад
Glad it helped!
@tassiblezilundu7602
@tassiblezilundu7602 3 года назад
Simply you're the best man.... I can't thank you enough.. almost three days trying this.. Anyway thank you you solved my problem
@GTCoding
@GTCoding 3 года назад
Glad to hear that
@ivyfu6454
@ivyfu6454 3 года назад
Thank you for teaching, 👍
@moniemonie96
@moniemonie96 3 года назад
Thank you for this 👏🏾👏🏾🙏🏾
@wahpukul3pagi
@wahpukul3pagi 3 года назад
great explaining, Thanks~
@emmanuelmarchal9741
@emmanuelmarchal9741 2 года назад
Well explained and it works !
@Salye
@Salye 3 года назад
Thank you so so much I learned a lots
@niwamicha226
@niwamicha226 3 года назад
thank you so match
@mohamedal-farooq6505
@mohamedal-farooq6505 2 года назад
thank you very match
@rajasthani_rang
@rajasthani_rang 3 года назад
Thank you dear
@najidmouhammad9708
@najidmouhammad9708 6 месяцев назад
great job, thank you so much. I tried to add a created_at column with datetime default current_time parameter but the date and the time are not added automatically so I should add them manually. someone can help me to fix this issue.thank you.
@marwenhammami9575
@marwenhammami9575 Год назад
Thanks
@Luggruff
@Luggruff Год назад
Is this a part of a playlist or something? Where is the actual form action for example?
@Sss-os4ys
@Sss-os4ys Год назад
please can i have a link to the video on how you created your form?
@ok2go949
@ok2go949 4 года назад
hi How do I enter a text file with only rows
@LuisMartinez-dh1vd
@LuisMartinez-dh1vd 8 месяцев назад
thank you!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@ASTekProductions
@ASTekProductions 4 года назад
White doing the stmt execute lart My browser ks showing error in execute() showing parameter not defined
@GTCoding
@GTCoding 4 года назад
Please send me your code
@jalalgang7357
@jalalgang7357 4 года назад
the data does not get inserted bro I know your method is working because I tried it before but now it's not working for me I am using mysql local host database
@YosipmikeColin
@YosipmikeColin 4 года назад
help Fatal error: Uncaught Error: Call to undefined method Base_datos::execute()
@tgreen5278
@tgreen5278 5 лет назад
I'm able to get it to submit to a database when I manually set name, etc. but when I use placeholders it's not sending any information. to the server. Do you have a contact that I can send my code to ?
@GTCoding
@GTCoding 5 лет назад
Contact me on my Facebook page: facebook.com/gtcoding
@mariafantuci1547
@mariafantuci1547 4 года назад
I would like to know how to insert data into a database when the class is using a composition relationship such as order (table) and itemsOrder (table). Because I can't find any youtube videos explaining this and I need to do a project for college and I don't know how to do it.
@GTCoding
@GTCoding 4 года назад
I am not currently planning on doing videos on database. Maybe in the future. You can contact me on my Facebook page if you need any help. facebook.com/gtcoding
@ratsitoherinaLogios
@ratsitoherinaLogios Год назад
I can have your help. it's the first time I use it
@ratsitoherinaLogios
@ratsitoherinaLogios Год назад
I want to use it with update and edite
@gergoszabo4035
@gergoszabo4035 2 года назад
How to check if the insert was successful?
@mohdaslam6650
@mohdaslam6650 5 лет назад
you deserve millions of subscribers
@GTCoding
@GTCoding 5 лет назад
+Mohd aslam Thank you so much.
@MASSDARIO
@MASSDARIO 4 года назад
i am doing everything just as it is in your code but my javascript is not connecting and my submit button is not no responding appropriately. i use a fujitsu laptop, can that be the reason ? i am very confused and have no idea what to do next.
@GTCoding
@GTCoding 4 года назад
You can find the source code in the description. Please check it or send me your code.
@kashifqureshi5581
@kashifqureshi5581 5 лет назад
sir cod does'nt work , query is not working message displayed message was sent but data is not shown in database? please help me
@GTCoding
@GTCoding 5 лет назад
+Kashif Qureshi Please send me your code.
@jalalgang7357
@jalalgang7357 4 года назад
I get sql error 3d000
@ratsitoherinaLogios
@ratsitoherinaLogios Год назад
Hi! i am trying your code.
@yastttsin1383
@yastttsin1383 4 года назад
doesn't work
@RationalRealmYT
@RationalRealmYT 5 лет назад
This code doesn't work.
@Acousticsoul215
@Acousticsoul215 5 лет назад
If the code doesn't work, can you explain to me how it does on the video? Can you explain how it's working just fine for me?
Далее
PDO Connections to MySQL from PHP
8:10
Просмотров 10 тыс.
Июль в Tanks Blitz
51:46
Просмотров 96 тыс.
Me: Don't cross there's cars coming
00:16
Просмотров 12 млн
PHP Login Script using PDO with Session
12:01
Просмотров 44 тыс.