<?php include('site-header.php'); ?>
<!-- end of LOGO CONTAINER -->
<!-- - - - - - - - - - - - - -->
<!-- start of SIDEBAR -->
<!-- - - - - - - - - - - - - -->
<?php include('left-nevigation.php'); ?>
<!-- - - - - - - - - - - - - -->
<!-- end of SIDEBAR -->
<!-- - - - - - - - - - - - - -->
<script src="ckeditor/ckeditor.js"></script>
<?php
$testi_id=$_REQUEST['testi_id'];
if(isset($_REQUEST['send'])){
$testi_name=$_REQUEST['testi_name'];
$testi_desc=$_REQUEST['testi_desc'];
$t_rationg=$_REQUEST['t_rationg'];
$sql="insert into tbl_testimonial set
testi_name='$testi_name',
t_rationg='$t_rationg',
testi_desc='$testi_desc'";
$data=mysqli_query($link,$sql);
}
if(isset($_REQUEST['Updt_id'])!=""){
if(isset($_REQUEST['Updt'])){
$testi_name=$_REQUEST['testi_name'];
$testi_desc=$_REQUEST['testi_desc'];
$t_rationg=$_REQUEST['t_rationg'];
$sqlUp="update tbl_testimonial set
testi_name='$testi_name',
t_rationg='$t_rationg',
testi_desc='$testi_desc'where testi_id='$_REQUEST[Updt_id]'";
mysqli_query($link,$sqlUp);
}
}
?>
<?php
if(isset($_REQUEST['Updt_id'])!=""){
$sql="select * from tbl_testimonial where testi_id='$_REQUEST[Updt_id]'";
$data=mysqli_query($link,$sql);
$result=mysqli_fetch_array($data);
}
?>
<main id="playground">
<!-- - - - - - - - - - - - - -->
<!-- start of TOP NAVIGATION -->
<!-- - - - - - - - - - - - - -->
<?php include('site-top-header.php'); ?>
<!-- - - - - - - - - - - - - -->
<!-- end of TOP NAVIGATION -->
<!-- - - - - - - - - - - - - -->
<!-- PAGE TITLE -->
<?php
$sql="select * from tbl_testimonial where testi_id='$_REQUEST[Updt_id]'";
$data=mysqli_query($link,$sql);
$result=mysqli_fetch_array($data);
?>
<section id="page-title" class="row">
<div class="col-md-8">
<h1>Testimonial</h1>
<p class="lead">Add your Testimonial below</strong>.</p>
</div>
<div class="col-md-4">
<ol class="breadcrumb pull-right no-margin-bottom">
<li><a href="dashboard.php">Testimonial</a></li>
<li class="active">Add Testimonial</li>
</ol>
</div>
</section>
<!-- / PAGE TITLE -->
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<a href="testimonial-list.php" class="btn btn-primary">Back</a>
</div>
<div class="col-md-12">
<form method="post" enctype="multipart/form-data">
<div class="form-group">
<label for="">Name</label>
<input type="text" class="form-control" name="testi_name" value="<?php echo $result['testi_name'];?>" placeholder="Enter Your customer Name">
</div>
<!--<div class="form-group">-->
<!-- <label for="">Location</label>-->
<!-- <input type="text" class="form-control" name="t_rationg" value="<?php echo $result['t_rationg'];?>" placeholder="Enter Location">-->
<!--</div>-->
<div class="col-md-12">
<h3>Description</h3>
<section class="panel tasks-widget">
<textarea id="ckeditor1" name="testi_desc"><?php echo $result['testi_desc']; ?></textarea>
</section>
</div>
<?php if(isset($_REQUEST['Updt_id'])){ ?>
<div class="text-center"> <button class="btn btn-primary" name="Updt">Update</button></ </div>
<?php }else
{ ?>
<div class="text-center"> <button class="btn btn-primary" name="send">Submit</button></ </div>
<?php } ?>
</form>
</div>
</div>
<!-- / container-fluid -->
<script>
CKEDITOR.replace(ckeditor1)
</script>
<?php include('site-footer.php'); ?>