As one of the steps in adding subcategories to the web video script that I’m using, I created a column in the db > table >videos juts like the one named category_id and named it sub_cat_id, then went on the add a subcategory choice in the upload form, adding lines 69 thru 78 in the following code:
<div class="wo_about_wrapper_parent">
<div class="wo_about_wrapper">
<div class="hero hero-overlay" style="background-color: #d84c47;">
<div class="container">
<h1 class="text-center">{{LANG upload_new_video}}</h1>
</div>
</div>
<svg id="wave" viewBox="0 0 100 15"><path fill="#d84c47" opacity="0.5" d="M0 30 V15 Q30 3 60 15 V30z"></path><path fill="#d84c47" d="M0 30 V12 Q30 17 55 12 T100 11 V30z"></path></svg>
</div>
</div>
<div class="col-md-2"></div>
<div class="col-md-8 pt_page_margin">
<div class="content pt_shadow">
<div class="col-md-12 pt_upload_vdo">
<?php if ($pt->user->admin == 1) { ?>
<div class="alert alert-warning">
<h4>Just admins can see this message</h4>
<p>Note: Your server max upload size is: <?php echo ini_get('upload_max_filesize')?>, means you can't upload files that are larger than: <?php echo ini_get('upload_max_filesize')?><br><br> If you want to increase the limit or If you can't upload large files, go to Admin Settings > Settings > Site Settings > Max upload size and increase the value, if you still can't upload large files, please contact your host provider and let them increase the upload limit and max_execution_time.</p>
</div>
<?php } ?>
<div class="upload upload-video" onclick="PT_OpenUploadForm();" data-block="video-drop-zone">
<div>
<svg fill="currentColor" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg" class="feather feather-upload"><path d="M14,13V17H10V13H7L12,8L17,13M19.35,10.03C18.67,6.59 15.64,4 12,4C9.11,4 6.6,5.64 5.35,8.03C2.34,8.36 0,10.9 0,14A6,6 0 0,0 6,20H19A5,5 0 0,0 24,15C24,12.36 21.95,10.22 19.35,10.03Z" /></svg>
<h4>{{LANG darg_drop_video}}</h4>
<p>{{LANG or}} {{LANG click_2choose_file}}</p>
<button class="btn btn-main">{{LANG upload}}</button>
</div>
</div>
<div class="progress hidden">
<span class="percent">0%</span>
<div class="progress_bar_parent">
<div class="bar upload-progress-bar progress-bar active"></div>
</div>
<div class="clear"></div>
<div class="text-center pt_prcs_vdo"></div>
</div>
<form action="" method="POST" id="upload-video" class="hidden">
<input type="file" name="video" accept="video/*" class="upload-video-file">
</form>
<div class="fluid upload-ffmpeg-mode hidden" id="upload-form">
<div class="col-md-12">
<form action="" class="form-horizontal setting-panel pt_forms" method="POST">
<div class="form-group">
<label class="col-md-12" for="title">{{LANG video_title}}</label>
<div class="col-md-12">
<input id="title" name="title" type="text" placeholder="" class="form-control input-md">
<span class="help-block">{{LANG video_title_help}}</span>
</div>
</div>
<div class="form-group">
<label class="col-md-12" for="description">{{LANG video_descritpion}}</label>
<div class="col-md-12">
<textarea name="description" id="description" cols="30" rows="5" class="form-control"></textarea>
</div>
</div>
<div class="form-group">
<label class="col-md-12" for="category_id">{{LANG category}}</label>
<div class="col-md-12">
<select name="category_id" id="category_id" class="form-control">
<?php foreach($pt->categories as $key => $category) {?>
<option value="<?php echo $key?>"><?php echo $category?></option>
<?php } ?>
</select>
</div>
</div>
**<div class="form-group">**
** <label class="col-md-12" for="sub_cat_id">{{LANG subcategories}}</label>**
** <div class="col-md-12">**
** <select name="sub_cat_id" id="sub_cat_id" class="form-control">**
** <?php foreach($pt->subcategories as $key => $subcategories) {?>**
** <option value="<?php echo $key?>"><?php echo $subcategories?></option>**
** <?php } ?>**
** </select>**
** </div>**
** </div>**
<div class="form-group">
<label class="col-md-12" for="tags">{{LANG tags}}</label>
<div class="col-md-12">
<input id="mySingleFieldTags" name="tags" type="text" placeholder="" class="form-control input-md">
<span class="help-block">{{LANG tags_help}}</span>
</div>
</div>
<div class="form-group hidden" id="video-thumnails">
<label class="col-md-12" for="thumbnail">{{LANG thumbnail}}</label>
<div class="col-md-12">
<div class="fluid">
<div class="carousel slide" id="choose-thumnail-cr" data-interval="false">
<div class="carousel-inner">
<div class="item active"></div>
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
</div>
<div class="fluid choose-thumnail-control">
<span class="pull-left">{{LANG video_thumbs}}</span>
<span class="pull-right">
<a class="btn btn-default" href="#choose-thumnail-cr" data-slide="prev">
<i class="fa fa-caret-left"></i>
</a>
<a class="btn btn-default" href="#choose-thumnail-cr" data-slide="next">
<i class="fa fa-caret-right"></i>
</a>
</span>
</div>
</div>
</div>
</div>
</div>
<div class="last-sett-btn modal-footer" style="margin: 0px -40px -10px -40px;">
<button type="submit" id="submit-btn" class="btn btn-main setting-panel-mdbtn" disabled><svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-check-circle'><path d='M22 11.08V12a10 10 0 1 1-5.93-9.14'></path><polyline points='22 4 12 14.01 9 11.01'></polyline></svg> {{LANG publish}}</button>
</div>
<input type="hidden" name="video-location" id="video-location" value="">
<input type="hidden" name="video-thumnail" id="video-thumnail" value="">
</form>
</div>
</div>
<div class="clear"></div>
</div>
<div class="clear"></div>
</div>
</div>
<div class="col-md-2"></div>
Can you spot anything wrong with what I’ve added?
Any help will be appreciated.