1. Home
  2. Computing & Technology
  3. PHP / MySQL

Storing User Submitted Data and Files in MySQL

By Angela Bradley, About.com

1 of 7

Creating a Form

Sometimes it is useful to collect data from your website users and store this information in a MySQL database. We have already seen you can populate a database using PHP, now we will add the practicality of allowing the data to be added through a user friendly web form.

The first thing we will do is create a page with a form. For our demonstration we will make a very simple one:

<form action="process.php" method="post">
Your Name: <input type="text" name="name"><br>
E-mail: <input type="text" name = "email"><br>
Location: <input type="text" name = "location"><br>
<input type="submit" value="Submit">
</form>

1 of 7

Explore PHP / MySQL

More from About.com

  1. Home
  2. Computing & Technology
  3. PHP / MySQL
  4. PHP with MySQL
  5. SQL Form - SQL File - Upload File

©2008 About.com, a part of The New York Times Company.

All rights reserved.