1. Technology
You can opt-out at any time. Please refer to our privacy policy for contact information.

Storing User Submitted Data and Files in MySQL


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"> 

  1. About.com
  2. Technology
  3. PHP / MySQL
  4. PHP with MySQL
  5. Storing user submitted files in a MySQL database.

©2014 About.com. All rights reserved.