D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
realadss
/
kavyaeventz.in
/
admin
/
Filename :
video-form.php
back
Copy
<?php include('include/header.php'); if(isset($_POST['add'])){ $Vcategory =$_POST['addcategory']; $Vtitle =$_POST['title']; $date = date('Y/m/d'); $modifiedText0 = str_replace("&", "and", $Vtitle); $text = strtolower($modifiedText0); $videoPath = $_POST['video']; $sql = "INSERT INTO `videos`(`category_name`, `video_title`, `video_name`, `date`) VALUES ('$Vcategory','$Vtitle','$videoPath','$date')"; $data= mysqli_query($conn,$sql); if($data){ echo "<script> alert('Video Added');window.location.href='videos.php'</script>"; } else{ echo "<script> alert('Please try aggggain')</script>"; } } ?> <!-- Content Wrapper. Contains page content --> <div class="content-wrapper"> <div class="container-full"> <!-- Content Header (Page header) --> <div class="content-header"> <div class="d-flex align-items-center"> <div class="me-auto"> <h4 class="page-title">Add Video</h4> <!--<div class="d-inline-block align-items-center">--> <!-- <nav>--> <!-- <ol class="breadcrumb">--> <!-- <li class="breadcrumb-item"><a href="#"><i class="mdi mdi-home-outline"></i></a></li>--> <!-- <li class="breadcrumb-item" aria-current="page">Products</li>--> <!-- <li class="breadcrumb-item active" aria-current="page">Add Products</li>--> <!-- </ol>--> <!-- </nav>--> <!--</div>--> </div> </div> </div> <!-- Main content --> <section class="content"> <div class="box"> <div class="box-header with-border"> <h4 class="box-title">Add New Video</h4> </div> <!-- /.box-header --> <div class="box-body"> <form role="form" method="POST" action=""> <div class="form-group"> <label class="form-label">Category</label> <select class="form-control" name="addcategory" required> <option>--- Select category ---</option> <?php $sql = "select * from video_category"; $query = mysqli_query($conn, $sql); while ($row1 = mysqli_fetch_assoc($query)) { echo "<option value='".$row1['id']."'>".$row1['category_name']."</option>"; }?> </select> </div> <div class="form-group"> <label class="form-label">Video Title</label> <input type="text" class="form-control" placeholder="Enter ..." name="title" required> </div> <div class="form-group"> <label class="form-label">Video Link</label> <input type="text" class="form-control" placeholder="Enter ..." name="video" required> </div> <!--<div class="form-group">--> <!-- <label class="form-label">Thumb Image</label>--> <!-- <input type="file" class="form-control mb-1" accept="image/png, image/jpeg, image/jpg" name="image" onchange="ShowImage(event)" required>--> <!-- <img src="" width="200" id="image" />--> <!--</div>--> <div class="box-footer"> <button type="submit" class="btn btn-success" name="add">Add</button> </div> </form> </div> <!-- /.box-body --> </div> </section> <!-- /.content --> </div> </div> <!-- /.content-wrapper --> <script src="//cdn.ckeditor.com/4.22.1/standard/ckeditor.js"></script> <script> CKEDITOR.replace( 'editor'); </script> <script> CKEDITOR.replace( 'editor2'); </script> <?php include('include/footer.php') ?>