D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
realadss
/
kavyaeventz.in
/
admin
/
Filename :
cat-edit.php
back
Copy
<?php include('include/header.php'); $id=$_GET['eid']; $catData=mysqli_query($conn,"select * from video_category where id='$id'"); $fetch=mysqli_fetch_array($catData); if(isset($_POST['update'])) { $id = $_POST['id']; $addcategory = $_POST['addcategory']; $text = strtolower($addcategory); $updateData=mysqli_query($conn,"update video_category set id='$id',category_name ='$text' where id='$id'"); if($updateData) { echo "<script>alert('Data Updated');window.location.href='category.php';</script>"; } else { echo mysqli_error($conn); } } ?> <!-- Content Wrapper. Contains page content --> <div class="content-wrapper"> <div class="container-full"> <!-- Main content --> <section class="content"> <div class="box"> <div class="box-header with-border"> <h4 class="box-title">Edit Category</h4> </div> <!-- /.box-header --> <div class="box-body"> <form role="form" method="POST" enctype="multipart/form-data"> <!-- text input --> <div class="form-group"> <label class="form-label">Id</label> <input type="text" class="form-control" name="id" value="<?php echo $fetch['id'];?>" readonly> </div> <div class="form-group"> <label class="form-label">Category</label> <input type="text" class="form-control" name="addcategory" value="<?php echo $fetch['category_name'];?>" required> </div> <div class="box-footer"> <button type="submit" class="btn btn-success" name="update">Update</button> </div> </form> </div> <!-- /.box-body --> </div> </div> <!-- /.box-body --> </div> </section> <!-- /.content --> </div> </div> <?php include('include/footer.php');?>