D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home3
/
antlerworldwide
/
public_html
/
admin
/
Filename :
faq_edit.php
back
Copy
<?php include('checklogin.php')?> <?php include('include/header.php')?> <!--// top-bar --> <!-- Forms content --> <section class="forms-section"> <?php include('include/conectdb.php'); $error=''; $pid=$_GET['id']; if(isset($_POST['contact'])) { $title=$_POST['title']; $text=$_POST['text']; $sql=mysqli_query($dbc,"UPDATE `faq` SET `name`='$title',tlb_des='$text' WHERE id='$pid'"); echo'<span class="successmssg">Content succeessfully Update to the website, <br/> <a href="faq.php" class="btn btn-primary">click to add more</a> <b></span>'; exit(); } else { $sql=mysqli_query($dbc,"SELECT * FROM `faq` where id='$pid'"); if(mysqli_num_rows($sql)==1) { $row=mysqli_fetch_array($sql); mysqli_free_result($sql); } else { echo'<span class="warn">Sorry no such Content exists.</span>'; exit(); } } ?> <div class="outer-w3-agile mt-3"> <h4 class="tittle-w3-agileits mb-4">Edit Detail</h4> <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12"> <div class=" table-responsive"> <form action="" method="post" enctype="multipart/form-data"> <div class="form-row"> <div class="form-group col-md-6"> <label for="inputCity">Title</label> <input type="text" name="title" value="<?php echo $row['name']; ?>" class="form-control"> </div> <div class="form-group col-md-12"> <label for="inputCity">Desicription</label> <textarea name="text" id="summernote"><?php echo $row['tlb_des']; ?></textarea> </div> </div> <div class="form-group col-md-12 text-center mt-4"> <button type="submit" name="contact" id="vchangeProfile" class="btn btn-primary" data-dismiss="modal" aria-hidden="true" title="submit">Update</button> <!--<button type="submit" name="vchangeProfile" id="vchangeProfile" class="btn btn-primary" data-dismiss="modal" aria-hidden="true" title="cancel">Cancel</button>--> <a href="faq.php" class="btn btn-primary" data-dismiss="modal" aria-hidden="true" title="cancel">Cancel</a> </div> </form> </div> </div> </div> </section> <!--// Forms content --> <?php include('include/footer.php') ?>