Location: PHPKode > projects > PortalXP - Teacher Edition > PortalXP/PortalXP/admin/deleteteacher.php
<?PHP

require('config.php');
require('connect.php');

?>

<TITLE><?php echo $domain ?> - Edit Teacher</TITLE>

<? INCLUDE("top-mini.php")?>

<link REL="stylesheet" TYPE="text/css" HREF="../portalxp.css">

<h3>Edit Teacher In Database:</h3><p>

<?php

// query the DB
$sql = "SELECT * FROM teacher WHERE teacher_id=$id";
$result = mysql_query($sql);	
$myrow = mysql_fetch_array($result);

if (isset($submit)) {

//process form
$sql2 = "DELETE FROM teacher WHERE teacher_id=$id";
$result = mysql_query($sql2);
echo "Thank you.  Your information has been updated.\n";

} else {

//display form

?>

<form method="post">
<table width=500px border=0>
<tr>
<td>School ID:
<td><input type="text" id="text" name="school_id" value="<?php echo $myrow["school_id"] ?>">
<tr>
<td>Title:
<td><input type="text" id="text" name="title" value="<?php echo $myrow["title"] ?>">
<tr>
<td>Lastname:
<td><input type="text" id="text" name="lastname" value="<?php echo $myrow["lastname"] ?>">
<tr>
<td>Firstname:
<td><input type="text" id="text" name="firstname" value="<?php echo $myrow["firstname"] ?>">
<tr>
<td>Phone Number:
<td><input type="text" id="text" name="phone" value="<?php echo $myrow["phone"] ?>">
<tr>
<td>E-Mail Address:
<td><input type="text" id="text" name="email" value="<?php echo $myrow["email"] ?>">


</table>

<input type="Submit" name="submit" value="Delete Record">

</form>

<?php

}  //end if

?>

<? INCLUDE("bottom.php")?>
Return current item: PortalXP - Teacher Edition