<?
virtual
("header.shtml");
?>


<?
mysql_connect
"localhost""username""passwd");

mysql_select_db"mlug") or die( "Error opening database");

?>

<form action="addlink.php3" method="post">
<table>
<tr><td>
<input type=text name=url>URL (don't forget the "http://" portion!!)<br>
</td></tr>
<tr><td>
<input type=text name=description>Description<br><br>
</td></tr>
<tr><td>Site Category &nbsp
<select name="type">
<option value="distribution">Distributions
<option value="news">News
<option value="software">Software
<option value="lugs">LUGS
<option value="magazine">Magazine
<option value="article">Articles/Reviews
<option value="begin">For Beginners
<option value="major">Major Linux Sites
<option value="programming">Programming
<option value="other">Other
</select>

<input type="submit" value="add url">
</td></tr></table>
</form>

<HR>
<?


$result 
mysql_query("select * from links where type = 'other' order
by description"
);
echo 
"<h2>OTHER</h2>";
while (
$row mysql_fetch_row($result))
    {
    echo 
"<a href=$row[0]>$row[2]</a><br>";
    }

$result mysql_query("select * from links where type = 'programming'
order by description"
);
echo 
"<br><br><h2>PROGRAMMING</h2>";
while (
$row mysql_fetch_row($result))
        {
        echo 
"<a href=$row[0]>$row[2]</a><br>";
        }

$result mysql_query("select * from links where type = 'major' order
by description"
);
echo 
"<br><br><h2>MAJOR LINUX SITES</h2>";
while (
$row mysql_fetch_row($result))
        {
        echo 
"<a href=$row[0]>$row[2]</a><br>";
        }

$result mysql_query("select * from links where type = 'begin' order
by description"
);
echo 
"<br><br><h2>FOR BEGINNERS</h2>";
while (
$row mysql_fetch_row($result))
        {
        echo 
"<a href=$row[0]>$row[2]</a><br>";
        }

$result mysql_query("select * from links where type = 'lugs' order
by description"
);
echo 
"<br><br><h2>LUG'S (Linux Users Groups)</h2>";
while (
$row mysql_fetch_row($result))
        {
        echo 
"<a href=$row[0]>$row[2]</a><br>";
        }

$result mysql_query("select * from links where type = 'distribution'
order by description"
);
echo 
"<br><br><h2>DISTRIBUTIONS</h2>";
while (
$row mysql_fetch_row($result))
        {
        echo 
"<a href=$row[0]>$row[2]</a><br>";
        }

$result mysql_query("select * from links where type = 'news'
order by description"
);
echo 
"<br><br><h2>LINUX NEWS</h2>";
while (
$row mysql_fetch_row($result))
        {
        echo 
"<a href=$row[0]>$row[2]</a><br>";
        }

$result mysql_query("select * from links where type = 'software'
order by description"
);
echo 
"<br><br><h2>LINUX SOFTWARE</h2>";
while (
$row mysql_fetch_row($result))
        {
        echo 
"<a href=$row[0]>$row[2]</a><br>";
        }

$result mysql_query("select * from links where type = 'magazine'
order by description"
);
echo 
"<br><br><h2>MAGAZINES ONLINE</h2>";
while (
$row mysql_fetch_row($result))
        {
        echo 
"<a href=$row[0]>$row[2]</a><br>";
        }

$result mysql_query("select * from links where type = 'article'
order by description"
);
echo 
"<br><br><h2>ARTICLES/REVIEWS</h2>";
while (
$row mysql_fetch_row($result))
        {
        echo 
"<a href=$row[0]>$row[2]</a><br>";
        }

?>




<?
virtual
("footer.shtml");
?>