PHP and MySQL Library Tutorial

General
Site Root
Database Home
Conect to MySQL
MySQL_Login.php
nav.php
dump.php

Clean Up resets the
database to contain
a few sensible
records.

Download Tutorial

Database
Create
Drop

Person Table
Create
Drop

Insert
Delete
Update
Search
Date-Search

Row Dump
Better View 
Table View 
Form View

Book Table
Create
Drop

Insert
Delete
Update
Search




Table View 
Form View

Loan Table
Create
Drop

Insert
Delete

Search




Table View

Documentation
Data Requirements
User Interface Design
Entity Relationship Diagrams
Data Flow Diagrams
Data Dictionary
Implementation Notes
Table Designs
Goals, Testing and Appraisal

Note - Create, Drop and Clean Up would be hidden on a real life system.
Contact - nbauers at samphire dot demon dot co dot uk
Copyright © - You may use and reproduce this material in a "not for profit" setting.

Insert New Person

Title
First Name
Last Name
Date of Birth (yyyy-mm-dd)

Code Listing : personInsertForm.php

<html>
<head>
<title>Insert Using a Form</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>

<?php include "nav.php"; ?>

<h2>Insert New Person</h2>
<form name="form1" method="post" action="personInsertFormDo.php">
<table border="1" cellpadding="4" cellspacing="0">
  <tr> 
    <td><div align="right">Title</div></td>
    <td> <input name="title" type="text" id="title"></td>
  </tr>
  <tr> 
    <td><div align="right">First Name</div></td>
    <td> <input name="first_name" type="text" id="first_name"></td>
  </tr>
  <tr> 
    <td><div align="right">Last Name</div></td>
    <td><input name="last_name" type="text" id="last_name"></td>
  </tr>
  <tr> 
    <td><div align="right">Date of Birth (yyyy-mm-dd)</div></td>
    <td><input name="date_of_birth" type="text" id="date_of_birth"></td>
  </tr>
  <tr> 
    <td colspan="2"><div align="right"> 
	<input type="submit" name="Submit" value="Submit">
      </div></td>
  </tr>
</table>
</form>

<?php 
  include "dump.php";
  dump_page(basename($_SERVER[SCRIPT_FILENAME]));  // Display the code of this page
?>

</body>
</html>