3D Gallery with Great Artwork Imagine Logo with Three Colors Beach Cabin 3D Android Tablet with Different Screens Studio Apartment Red Figured Greek Vase on Blue Background Silver and Gold Flashlight Lake on Fire

RESTful Post: Overview

Page 1

HTML, PHP, MySQL

This tutorial demonstrates how to use basic RESTful HTML post, with PHP and MySQL. The end result displays a Web page table derived from the posted MySQL data.

Steps to Implement

  1. Create a CSS3 style sheet with selectors, declaration blocks, properties and values.
  2. Create a Web page with a form and input data. Display the form with your style sheet.
  3. Create a MySQL database, table and columns. The columns correspond to the form's input data.
  4. The form, from item 2 in this list, has a Post Data button which links to a PHP file.
  5. Implement functions in a PHP file that obtain the form's input data.
  6. The PHP file's functions connect to your database and table.
  7. The PHP file's functions insert, or update, fields in your table, using SQL statements.
  8. The PHP file's functions display an HTML table, with the database table's fields. Display the table with your style sheet.
  9. The PHP file closes the database connection.

Three Components: Same Fields

The HTML form's input name values, ideally correspond with the PHP $_POST values, and the MySQL table column identifiers. However you can give the MySQL table's identifiers different values. It's just easier to understand when MySQL columns match HTML form attributes and PHP variables.

In other words, all three components work together. The form works with PHP which works with MySQL.

Try It!

Try the Post to PHP example described in this tutorial.


Ads >
Create 3D Games: Learn WebGL Book 2 Simple Shaders: Learn WebGL Book 4
3D Programming for Beginners: Learn WebGL Book 1

for Web graphics!

Copyright © 2022 Amy Butler. All Rights Reserved.