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:
[ Ссылка ]
For a more detailed version of the techniques shown in this video, check out the full course here: 🎓 [ Ссылка ]
Please consider supporting my channel: ☕ [ Ссылка ]
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:
[ Ссылка ]
Relevant documentation:
[ Ссылка ]
[ Ссылка ]
[ Ссылка ]
[ Ссылка ]
[ Ссылка ]
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
Ещё видео!