Index: mythweb/video_edit.php
===================================================================
--- mythweb/video_edit.php	(revision 7373)
+++ mythweb/video_edit.php	(working copy)
@@ -87,9 +87,7 @@
        $result = mysql_query('SELECT * FROM videocategory')
             or trigger_error('SQL Error: '.mysql_error(), FATAL);
            while( $cat_data = mysql_fetch_assoc($result) )  {
-           $num_cat++;
-           $cat_str = $cat_data["category"]; ?>
-       <option <?if ($category == $num_cat) print "selected"; ?> value="<?print $num_cat; ?>"><?print $cat_str; ?></option>
+      ?><option <?if ($category == $cat_data["intid"]) print "selected"; ?> value="<?print $cat_data["intid"]; ?>"><?print $cat_data["category"]; ?></option>
        <?}
    ?></td>
 </tr><tr>
Index: mythweb/themes/Default/video.php
===================================================================
--- mythweb/themes/Default/video.php	(revision 7373)
+++ mythweb/themes/Default/video.php	(working copy)
@@ -40,7 +40,7 @@
     if( $Filter_Category == -1)
         echo "selected";
     echo ">All</option>\n";
-    for($i=0;$i<=$Total_Categories;$i++) {
+    foreach (array_keys($Category_String) as $i) {
         echo "<option value=$i ";
         if( $i == $Filter_Category )
             echo "selected";
