D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
G:
/
PleskVhosts
/
jhalakdembla.com
/
akkonlineservices.com
/
Admin
/
Filename :
EditProduct.php
back
Copy
<?php include('layout/header.php'); require('Coding/db.php'); $id = $_GET['id']; $query = "SELECT *,productcategory.Title AS CtgTitle FROM `productcategory` INNER JOIN `product` ON productcategory.id = product.ProductCtgId where product.id = $id"; $result = mysqli_query($conn,$query); $row = mysqli_fetch_assoc($result); $queryy = "SELECT * FROM `productcategory`"; $resultt = mysqli_query($conn,$queryy); ?> <section> <div class="row"> <div class="col-12 col-xl-6 mx-auto"> <div class="card"> <div class="card-header"> <h5 class="card-title">Add Product</h5> <!-- <h6 class="card-subtitle text-muted">Default Bootstrap form layout.</h6> --> </div> <div class="card-body"> <form action="Coding/updatecontroller.php" method="post" enctype="multipart/form-data"> <input type="hidden" name="id" value="<?php echo $row['id'];?>"> <input type="hidden" name="_Image1" value="<?php echo $row['Image1']; ?>"> <input type="hidden" name="_Image2" value="<?php echo $row['Image2']; ?>"> <input type="hidden" name="_Image3" value="<?php echo $row['Image3']; ?>"> <input type="hidden" name="_Image4" value="<?php echo $row['Image4']; ?>"> <div class="mb-3"> <label class="form-label">Category</label> <select class="form-control mb-3" name="ctg"> <option selected>Open this select menu</option> <?php while($rows = mysqli_fetch_assoc($resultt)){ ?> <option value="<?php echo $rows['id'];?>" selected="<?php if($rows['id'] == $row['ProductCtgId']); ?>" ><?php echo $rows['Title'];?></option> <?php }?> </select> </div> <div class="mb-3"> <label class="form-label">Product Title</label> <input type="text" class="form-control" value="<?php echo $row['Title']; ?>" name="Prdtitle" placeholder="Title"> </div> <div class="mb-3"> <label class="form-label">MRP</label> <input type="text" class="form-control" value="<?php echo $row['Mrp']; ?>" name="mrp" placeholder="MRP"> </div> <div class="mb-3"> <label class="form-label">Price</label> <input type="text" class="form-control" value="<?php echo $row['Price']; ?>" name="price" placeholder="Price"> </div> <div class="row"> <div class="mb-3 col-6"> <label class="form-label w-100">Image 1</label> <input type="file" name="imgone" value="<?php echo $row['Image1']; ?>" /> <!-- <small class="form-text d-block text-muted">Example block-level help text here.</small> --> </div> <div class="mb-3 col-6"> <label class="form-label w-100">Image 2</label> <input type="file" name="imgtwo" value="<?php echo $row['Image2']; ?>" /> <!-- <small class="form-text d-block text-muted">Example block-level help text here.</small> --> </div> <div class="mb-3 col-6"> <label class="form-label w-100">Image 3</label> <input type="file" name="imgthree" value="<?php echo $row['Image3']; ?>" /> <!-- <small class="form-text d-block text-muted">Example block-level help text here.</small> --> </div> <div class="mb-3 col-6"> <label class="form-label w-100">Image 4</label> <input type="file" name="imgfour" value="<?php echo $row['Image4']; ?>" /> <!-- <small class="form-text d-block text-muted">Example block-level help text here.</small> --> </div> </div> <div class="mb-3"> <label class="form-label w-100">Description</label> <textarea id="editors" name="description" style="height: 300px;" required><?php echo $row['Description']; ?></textarea> </div> <button name="submit" class="btn btn-primary">Update</button> </form> </div> </div> </div> </div> </section> <script src="//cdn.ckeditor.com/4.19.1/standard/ckeditor.js"></script> <script> CKEDITOR.replace( 'editors' ); </script <?php include('layout/footer.php'); ?>