Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
squireless
/
admin
/
product
:
edit_product.php
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?php include("header.php"); $id = ""; $product = ""; if(isset($_GET['id'])) { $id = $_GET['id']; $query = "SELECT * from product where id='$id'"; $product =db::getRecord($query); } ?> <section id="breadcrumb-alignment"> <div class="row"> <div class="col-sm-12"> <div class="card"> <div class="card-body"> <div class="d-flex justify-content-between breadcrumb-wrapper"> <nav aria-label="breadcrumb "> <ol class="breadcrumb mt-2"> <li class="breadcrumb-item"><a href="javascript:void(0)"><i class='bx bx-home-alt mx-1'></i>Dashboard</a></li> <li class="breadcrumb-item"><a href="product.php">Products</a></li> <li class="breadcrumb-item"><a href="javascript:void(0)">Edit Products</a></li> </ol> </nav> </div> </div> </div> </div> </div> </section> <!-- Breadcrumb Alignment Ends --> <h2 class="mb-0 text-center h1 text-primary uppercase">Edit Products</h2> <hr> <div class="row justify-content-center pb-5 mb-5"> <?php if($product!=NULL) { ?> <div class="col-12 col-lg-10 col-xl-10"> <div class="card p-3"> <form action="../action.php" method="post" enctype="multipart/form-data"> <div class="form-group"> <label class="h4">Upload Image</label> <div class="file-upload-wrapper"> <input type="file" name="file[]" multiple class="form-control form-control-lg file-upload" /> </div> </div> <div class="form-group"> <label class="h4">Name</label> <input type="text" id="edit_c_name" value="<?php echo $product['name']; ?>" name="name" class="form-control form-control-lg radius-30" required /> </div> <div class="custom-control custom-control-success custom-switch mb-3"> <?php $status = $product['featured']; if ($status == 1) { ?> <input type="checkbox" name="status" value="1" onclick="old_price1(<?php echo $product['id']; ?>)" checked class="custom-control-input" id="<?php echo $product['id']; ?>"> <label class="h4 custom-control-label" data-label-off="NO" data-label-on="YES" for="<?php echo $product['id']; ?>">Sale</label> <?php } else { ?> <input type="checkbox" name="status" value="1" class="custom-control-input" id="<?php echo $product['id']; ?>"> <label class="h4 custom-control-label" data-label-off="NO" data-label-on="YES" for="<?php echo $product['id']; ?>">Featured</label> <?php } ?> </div> <div class="form-group"> <label class="h4">Description</label> <textarea class="ckeditor form-control form-control-lg radius-30" name="description" rows="5"><?php echo $product['description']; ?></textarea> </div> <div class="row"> <div class="col-lg-12 col-md-12"> <div class="form-group"> <label class="h4">Update Benefit Images</label> <div class="file-upload-wrapper"> <input type="file" name="file1" multiple class="form-control form-control-lg file-upload" /> </div> </div> </div> </div> <div class="form-group"> <label class="h4">Benefits</label> <textarea type="text" name="benefit" rows="5" class="ckeditor form-control form-control-lg radius-30" ><?php echo $product['benefit']; ?></textarea> </div> <input type="text" id="edit_id" value="<?php echo $product['id']; ?>" name="edit_id" hidden> <div class="form-group text-right"> <button type="submit" class="btn btn-success btn-lg " name="edit_products">Update </button> </div> </form> </div> </div> </div> <?php } else{ echo "Data is not Found!!"; } ?> <?php include("footer.php"); ?>