Location: PHPKode > projects > PortalXP - Teacher Edition > PortalXP/PortalXP/admin/deletelinks.php



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

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

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

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


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

if (isset($submit)) {

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

} else {

//display form

$sql3 = "SELECT * FROM teacher, links WHERE links.links_id = $id and links.teacher_id = teacher.teacher_id";
$result3 = mysql_query($sql3);
$myrow3 = mysql_fetch_array($result3);


<form method="post">
<table width=500px border=0>
<td>Teacher ID:
<td><?php echo $myrow["teacher_id"] ?> - <?php echo $myrow3["lastname"] ?>, <?php echo $myrow3["firstname"] ?>
<td><input type="text" id="text" name="website" value="<?php echo $myrow["website"] ?>">
<td>Display Name:
<td><input type="text" id="text" name="displayname" value="<?php echo $myrow["displayname"] ?>">
<td>Link Description:
<td><textarea rows="5" cols="55" id="text4" name="link_description" value="none"><?php echo $myrow["link_description"] ?></textarea>

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



}  //end if


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