<input type="hidden" id="baseurl" value="<?php echo base_url(); ?>" >
<div class="row">
    <div class="col-md-6 margin-bottom-30">
        <div class="hs_heading medium">
            <h3>Update Blog</h3>
        </div>
		<form id="updateblogs" method="post" enctype="multipart/form-data">
        <div class="hs_input">
            <label>Title</label>
            <input type="text" class="form-control" name="blog_title" id="b_title" value="<?php if(!empty($blogdeatils)){ echo $blogdeatils[0]->blog_title; } ?>">
        </div>
        <div class="hs_input">
            <label>Category</label>
            <select class="form-control" name="blog_cate" id="b_category">
			    <option value="0">Choose One</option>
				 <?php if(!empty($blog_category)){ foreach($blog_category as $blog_cate){  ?>
                <option value="<?php echo $blog_cate->cate_id; ?>" <?php if($blog_cate->cate_id == $blogdeatils[0]->blog_category){ echo "selected"; }  ?> ><?php echo $blog_cate->cate_name; ?></option>
				<?php 
					}
				}
				?>
			</select>
        </div>
        <div class="hs_input">
            <label for="exampleInputFile">Feature Image</label>
            <input type="file" name="blog_image" id="exampleInputFile" class="form-control">
        </div>
		<div class="hs_input">
            <label>Short Content</label>
            <textarea rows="4" class="form-control" name="blog_content" id="b_content"><?php if(!empty($blogdeatils)){ echo $blogdeatils[0]->blog_content; } ?></textarea>
        </div>
		<div class="hs_input">
            <label>Long Content</label>
            <textarea rows="4" class="form-control" name="longblog_content" id="longb_content"><?php if(!empty($blogdeatils)){ echo $blogdeatils[0]->blog_longcontent; } ?></textarea>
        </div>
		<input type="hidden" id="old_blogid" name="blog_id" value=" <?php if(!empty($blogdeatils)){ echo $blogdeatils[0]->blog_id;  } ?>" >
        <button type="submit" class="btn">Update</button>
		</form>
    </div>
</div>
