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

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

?>

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

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

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

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

<?php

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

if (isset($submit)) {

//process form
$sql2 = "DELETE FROM periods WHERE periods_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>Teacher ID:
<td><input type="text" id="text" name="teacher_id" value="<?php echo $myrow["teacher_id"] ?>">
<tr>
<td>Hour Number:
<td><input type="text" id="text" name="hournumber" value="<?php echo $myrow["hournumber"] ?>">
<tr>
<td>Start Time:
<td><input type="text" id="text" name="starttime" value="<?php echo $myrow["starttime"] ?>">
<tr>
<td>End Time:
<td><input type="text" id="text" name="endtime" value="<?php echo $myrow["endtime"] ?>">
<tr>
<td>Class Name:
<td><input type="text" id="text" name="classname" value="<?php echo $myrow["classname"] ?>">
</table>

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

</form>

<?php

}  //end if

?>

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