Location: PHPKode > projects > PHP Enter > www/admin/editcat.php
<?php include('header.php'); include('options.php'); ?>
<table width="90%" border="0" align="center" cellpadding="2" cellspacing="8" bgcolor="#FFFFFF">
<tr><td><strong>Manage Categories</strong></td><tr>
<tr><td width="450px">
<div id=vforms>
<?php
echo '<form name="myform">';
$result = mysql_query("SELECT * FROM categori WHERE cord=0 ORDER by name ASC");
echo"<select name=\"gruppe\" onChange=\"Load_id()\">";

echo"<option value>---</option>";
while($row = mysql_fetch_array($result)) {
$selected = ($row["catid"] == $id)? "SELECTED":"";
echo"<option value=\"".$row['catid']."\"". $selected." > - - ".$row['name']."</option>";
  }
echo '</select>';
echo"</form></div></center></td></tr></table>";
?>
<script type="text/javascript">
function Load_id() 
{
var id = document.myform.gruppe.options[document.myform.gruppe.selectedIndex].value
var id_txt = "setcat.php?id="
location = id_txt + id
}
</script>
Return current item: PHP Enter