/home3/vehiclea/public_html/admin-kalyanidentalclinics-com/testimonial.php
<?php
session_start();
$_SESSION['active'] = 'testimonals';
include "header.php";
if(!empty($_POST{'submit'})){
testimonial_insert();
}
?>
<body>
<main id="main" class="main">
<div class="pagetitle">
<h1>TESTIMONIALS</h1>
<nav>
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="dashboard.php">Home</a></li>
<li class="breadcrumb-item active">Testimonials</li>
</ol>
</nav>
</div>
<section class="section">
<div class="row">
<div class="col-lg-12">
<div class="card">
<div class="card-body">
<h5 class="card-title"> Add Testimonials </h5>
<?php
if(!empty($_GET['succ']))
{
?>
<div align="center" style="color:green;"> <h4>Testimonials Data Added Successfully</h4></div>
<?php
}
?>
<form method="post" enctype="multipart/form-data" onsubmit="return testimonial_validation()">
<div class="row">
<div class="col-md-6 col-lg-6">
<label class="col-sm-2 col-form-label">Name</label>
<input type="text" class="form-control" name="name" id="name" placeholder="Enter Name">
<div class="error" id="err1" align="center" style="color:red;"></div>
</div>
<div class="col-md-6 col-md-6">
<label class="col-sm-2 col-form-label">Designation</label>
<input type="text" class="form-control" name="designation" id="designation" placeholder="Enter Designation">
<div class="error" id="err2" align="center" style="color:red;"></div>
</div>
<div class="col-md-12 col-md-12">
<label class="col-sm-2 col-form-label">Description</label>
<textarea class="form-control" id="content" name="content" placeholder="Enter Content" rows=10></textarea>
<div class="error" id="err3" align="center" style="color:red;"></div>
</div>
<div class="col-md-6 col-lg-6">
<label class="col-sm-2 col-form-label">File Upload</label>
<input class="form-control" type="file" id="formFile" name="formFile">
<div class="error" id="err4" align="center" style="color:red;"></div>
</div>
<div class="col-md-6 col-lg-6">
<label class="col-sm-2 col-form-label">status</label>
<select name="status" id="status" class="form-control">
<option value="1">Active</option>
<option value="2">Inactive</option>
</select>
<div class="error" id="err5" align="center" style="color:red;"></div>
</div>
</div>
<div class="row">
<div class="col-sm-10" align="center"> <br>
<input type="submit" name="submit" value="Submit" class="btn btn-primary">
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</section>
</main>
<?php include "footer.php"; ?>
<script>
function testimonial_validation(){
if ($('#name').val() == '') {
valid_error("service_name", "Enter Name", "err1");
return false;
}
else if ($('#designation').val() == '') {
$('#err1').hide();
valid_error("title", "Enter Designation", "err2");
return false;
}
// else if ($('#content').val() == '') {
// $('#err2').hide();
// valid_error("content", "Enter Service Description", "err3");
// return false;
// }
else if ($('#formFile').val() == '') {
$('#err3').hide();
valid_error("formFile", "Choose File", "err4");
return false;
}
else
{
return true;
}
}
function valid_error(id, error, err) {
$('.errr').html('');
$('#' + err).show();
$('#' + err).html(error);
$('#' + id).focus();
return false;
}
</script>
@LwBee Strong Bypass
Upload File
Create New File