<?php
	require_once ('authorize1.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">

<head>
<title>Moreno Travel</title>
<script src="sorttable.js"></script>
    <link href="style.css" rel="stylesheet" type="text/css" />
    <meta http-equiv="content-type"
        content="text/html; charset=utf-8" />

<style>

tr.order { border-bottom: 1px solid }</style

</head>



<?php include 'admin_header.php'; ?>

<h1>Manage Categories</h1>


<ul>



<p>Manage categories as required:</p>

Click <a href="admin_addcategory.php">here</a> to add a new category.<br><br>

<?php
require_once('connectvars.php');

$dbh = mysql_connect(hostname, username, password)

	or die("Unable to connect to MySQL");

mysql_select_db (dbname, $dbh);


$result = mysql_query("SELECT * FROM category ORDER BY category");


$i = 0;

print "<form name='managecategories' method='post' action='admin_updatecategories.php'>\n";

while ($cats = mysql_fetch_array($result)) {


  print "<input type='hidden' name='category_id[$i]' value='{$cats['category_id']}' />";
  print "<input type='text' size='40' name='category[$i]' value='{$cats['category']}' /> <br>";

++$i;
}
print "<br><input type='submit' value='submit' />";
print "</form>";
mysql_close();
?>



<br><br>




</ul><br><br><br>
</div>

</div>

</body>

</html>