Save HTML Form Data to a MySQL Database using PHP
Автор: Dave Hollingworth
Загружено: 15 мар. 2022 г.
Просмотров: 236 502 просмотра
Learn how to create a form in HTML, then save the data from that form to a MySQL database using PHP.
‣ EXCLUSIVE hosting with Bluehost at $1.99/month:
https://bluehost.sjv.io/c/5821198/137...
For a more detailed version of the techniques shown in this video, check out the full course here: 🎓 https://skl.sh/3tNX25N
Please consider supporting my channel: ☕ https://ko-fi.com/davehollingworth
In this video you'll learn how to:
create a form in HTML using best practices
create form controls for simple text input
use multi-line text input using the textarea element
use select lists, radio buttons and checkboxes
process the submitted form data using PHP
validate the form data using filter functions
avoid an SQL injection attack
use a prepared statement to insert a new record into a database
create a database and table using phpMyAdmin
use an SQL INSERT INTO statement to insert a record
Code shown in the video:
https://gist.github.com/daveh/c5a6911...
Relevant documentation:
https://developer.mozilla.org/docs/We...
https://developer.mozilla.org/docs/We...
https://www.php.net/manual/filter.fil...
https://www.php.net/manual/mysqli-stm...
https://www.mysqltutorial.org/mysql-d...
00:00 Introduction
00:15 Create the HTML file
01:09 Simple text input
01:38 Labels
02:34 Textarea
03:19 Styling with CSS
04:19 Lists
05:49 Radio buttons
07:36 Fieldset
08:34 Checkbox
09:28 Create the PHP file
11:47 Get the form data
12:55 Filter the data
15:04 Validate the data
16:00 Create the database
16:12 Create the table
17:08 Connect from PHP
19:50 Write the SQL
20:32 SQL injection attack
21:00 Prepared statement
22:08 Bind values to placeholders
23:42 Insert the data
24:06 Summary
#HTML #PHP #MySQL #forms

Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: