Form Post with PHP
Example
Learn to post data to a form with PHP and MySQL. Enter information in the form, below.
Enter your user name, password, and favorite color in the form below. This example demonstrates how to use basic RESTful HTML post, in a form, for PHP and MySQL. The end result displays a Web page table derived from the posted MySQL data. See the form HTML markup, below.
Form HTML Markup
<form action="../tables/table-colors.php" method="post"> <label>User Name:</label> <input type="text" name="user" value="user"> <label>Password/Email:</label> <input type="text" name="pwd" value="pwd"> <label>Favorite Color:</label> <input type="text" name="data" value="blue"> <label>Submit to Database:</label> <input type="submit" value="Post Data"> </form>