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

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

?>

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

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

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

<h3>Add News To Links:</h3><p>

<?php

if (isset($submit)) {

//process form
$sql = "INSERT INTO links (teacher_id,website,displayname,link_description) VALUES ('$teacher_id','$website','$displayname','$link_description')";
$result = mysql_query($sql);
echo "Thank you.  Your information has been entered.\n";

} else {

//display form

$sql2 = "SELECT firstname, lastname FROM teacher where teacher_id = $id";
$result2 = mysql_query($sql2);	
$myrow2 = mysql_fetch_array($result2);

?>

<form method="post" action="<?php echo $PHP_SELF?>">
<table width=500px border=0>
<tr>
<td>Teacher ID:
<td><?php echo $id ?> - <?php echo $myrow2["lastname"] ?>, <?php echo $myrow2["firstname"] ?>
<tr>
<td>Website (without http):
<td><input type="text" id="text" name="website">
<tr>
<td>Display Name:
<td><input type="text" id="text" name="displayname">
<tr>
<td>Link Description:
<td><textarea rows="5" cols="55" id="text4" name="link_description" value="none"></textarea>
<input type="Hidden" name="teacher_id" value="<?php echo $id ?>">
<input type="Submit" name="submit" value="Enter Information">
</table>
	<hr size="1">
	<center><b>Formatting</b></center>
	<pre>
	<b>[b]...[/b]</b>                 Bold
	<b>[i]...[/i]</b>                 Italics
	<b>[pre]...[/pre]</b>             Preformatted
	<b>[indent]...[/indent]</b>       Indented Blocks (blockquote)
	<b>[link="..."]...[/link]</b>     Links (javascript is not permitted)
	</pre>
</form>

<?php

}  //end if

?>

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