Overview
Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
Learn how to create an HTML form and save its data to a MySQL database using PHP in this comprehensive 25-minute tutorial. Create form controls for text input, multi-line text areas, select lists, radio buttons, and checkboxes while following best practices. Process and validate submitted form data using PHP filter functions, and protect against SQL injection attacks with prepared statements. Set up a database and table using phpMyAdmin, then use SQL INSERT INTO statements to add new records. Gain practical skills in web development, database management, and secure coding practices through step-by-step instructions and real-world examples.
Syllabus
Introduction
Create the HTML file
Simple text input
Labels
Textarea
Styling with CSS
Lists
Radio buttons
Fieldset
Checkbox
Create the PHP file
Get the form data
Filter the data
Validate the data
Create the database
Create the table
Connect from PHP
Write the SQL
SQL injection attack
Prepared statement
Bind values to placeholders
Insert the data
Summary
Taught by
Dave Hollingworth