on line 227 you have:
<option value="<?php echo($GallerySubCat->getColumnVal("CategoryID")); ?>" <?php if (!(strcmp($GallerySubCat->getColumnVal("ProductContentsID"), (ValidatedField("contentinsert","GallerySubCat"))))) {echo "selected=\"selected\"";} ?>><?php echo($GallerySubCat->getColumnVal("ProductName")); ?></option>
but the comparison has to match the option value, so it should probably be:
<option value="<?php echo($GallerySubCat->getColumnVal("ProductContentsID")); ?>" <?php if (!(strcmp($GallerySubCat->getColumnVal("ProductContentsID"), (ValidatedField("contentinsert","GallerySubCat"))))) {echo "selected=\"selected\"";} ?>><?php echo($GallerySubCat->getColumnVal("ProductName")); ?></option>