Web Databases

Examples of using PHP with a MySQL database

[Nov 23, 2009 14:09] Web access to Microsoft Live@edu accounts now works.

The following pages provide examples of using PHP with a MySQL database. Find out how to get an account on ITC's MySQL server >>

For more information on availability of php, and non-database php applications, please see our php page.

For each of these examples, the database name is "mst3k_Inventory". If you would like to download your own copy of mst3k_Inventory, consult our database instructions.

Simple Queries

One-table query List of computers Minimal formatting More formatting
One-table query List of employees Minimal formatting More formatting
Multi-table query Inventory Minimal formatting More formatting

Query based on user input

Pick from a list Select an employee Minimal formatting More formatting
Drop down menu Select an employee Minimal formatting More formatting
Text search Enter an employee's name Minimal formatting More formatting

Inserting data into the database

Input form Add a new computer Minimal formatting More Formatting
Input form Add a new employee Minimal formatting More formatting
Input form Add a new inventory record Minimal formatting More formatting

© 2009 by the Rector and Visitors of the University of Virginia.

The information contained on the University of Virginia’s Department of Information Technology and Communication (ITC) website is provided as a public service with the understanding that ITC makes no representations or warranties, either expressed or implied, concerning the accuracy, completeness, reliability or suitability of the information, including warrantees of title, non-infringement of copyright or patent rights of others. These pages are expected to represent the University of Virginia community and the State of Virginia in a professional manner in accordance with the University of Virginia’s Computing Policies.