Index: video_edit.php
===================================================================
RCS file: /var/lib/mythcvs/mythplugins/mythweb/video_edit.php,v
retrieving revision 1.4
diff -u -r1.4 video_edit.php
--- video_edit.php	7 Jun 2005 05:27:06 -0000	1.4
+++ video_edit.php	23 Jun 2005 19:25:40 -0000
@@ -96,7 +96,7 @@
        $result = mysql_query('SELECT * FROM videocategory')
             or trigger_error('SQL Error: '.mysql_error(), FATAL);
            while( $cat_data = mysql_fetch_assoc($result) )  {
-           $num_cat++;
+           $num_cat = $cat_data["intid"];
            $cat_str = $cat_data["category"]; ?>
        <option <?if ($category == $num_cat) print "selected"; ?> value="<?print $num_cat; ?>"><?print $cat_str; ?></option>
        <?}

Index: themes/Default/video.php
===================================================================
RCS file: /var/lib/mythcvs/mythplugins/mythweb/themes/Default/video.php,v
retrieving revision 1.8
diff -u -r1.8 video.php
--- themes/Default/video.php	27 Feb 2005 22:39:29 -0000	1.8
+++ themes/Default/video.php	23 Jun 2005 18:57:05 -0000
@@ -40,12 +40,18 @@
     if( $Filter_Category == -1)
         echo "selected";
     echo ">All</option>\n";
-    for($i=0;$i<=$Total_Categories;$i++) {
-        echo "<option value=$i ";
-        if( $i == $Filter_Category )
-            echo "selected";
-        echo ">"; 
-        echo "$Category_String[$i]</option>\n";
+    $i=0;      // Represents category field intid
+    $count=0;  // Number of categories printed so far
+    while ($count <= $Total_Categories) {
+        if (isset($Category_String[$i]))  {
+          echo "<option value=$i ";
+          if ($i == $Filter_Category)
+              echo "selected";
+          echo ">";
+          echo "$Category_String[$i]</option>\n";
+          $count++;
+        }
+        $i++;
     }
     echo "</select>\n";
     echo "<input TYPE=\"SUBMIT\" VALUE=\"Update\" >";
