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