D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
realadss
/
.trash
/
admin
/
Filename :
faq-form.php
back
Copy
<?php include('include/header.php'); if(isset($_POST['add'])){ $question =$_POST['question']; $answer =$_POST['answer']; $date = date('Y/m/d'); $data= mysqli_query($conn,"insert into faq (id,question,answer,createdate) values(' ','$question','$answer','$date')"); if($data){ echo "<script> alert('faq Added');window.location.href='faq.php'</script>"; } else{ echo "<script> alert('Please try again')</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 faq</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 Faq</h4> </div> <!-- /.box-header --> <div class="box-body"> <form role="form" method="POST"> <!-- text input --> <div class="form-group"> <label class="form-label">Question</label> <input type="text" class="form-control" placeholder="Enter ..." name="question" required> </div> <div class="form-group"> <label class="form-label">Answer</label> <input type="text" class="form-control" placeholder="Enter ..." name="answer" required> </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> <?php include('include/footer.php') ?>