<?PHP
require('config.php');
require('connect.php');
?>
<TITLE><?php echo $domain ?> - Add Teacher</TITLE>
<? INCLUDE("top-mini.php")?>
<link REL="stylesheet" TYPE="text/css" HREF="../portalxp.css">
<h3>Add Teacher To Database:</h3><p>
<?php
if (isset($submit)) {
//process form
$sql = "INSERT INTO teacher (school_id,title,lastname,firstname,phone,email) VALUES ('$school_id','$title','$lastname','$firstname','$phone','$email')";
$result = mysql_query($sql);
echo "Thank you. Your information has been entered.\n";
} else {
//display form
?>
<form method="post" action="<?php echo $PHP_SELF?>">
<table width=500px border=0>
<tr>
<td>School ID:
<td><input type="text" id="text" name="school_id">
<tr>
<td>Title:
<td><input type="text" id="text" name="title">
<tr>
<td>Lastname:
<td><input type="text" id="text" name="lastname">
<tr>
<td>Firstname:
<td><input type="text" id="text" name="firstname">
<tr>
<td>Phone Number:
<td><input type="text" id="text" name="phone">
<tr>
<td>E-mail Address:
<td><input type="text" id="text" name="email">
</table>
<input type="Submit" name="submit" value="Enter Information">
</form>
<?php
} //end if
?>
<? INCLUDE("bottom.php")?>