Server IP : 108.170.25.35 / Your IP : 18.217.122.251 Web Server : Apache/2 System : Linux gains.winzonesoftech.com 4.18.0-513.24.1.el8_9.x86_64 #1 SMP Mon Apr 8 11:23:13 EDT 2024 x86_64 User : studio ( 1434) PHP Version : 8.1.28 Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/studio/public_html/admin/ |
Upload File : |
<?php include('session.php')?> <?php include 'header.php';?> <?php include 'sidebar.php';?> <?php include ("conn.php"); $user = $_SESSION['username']; if(isset($_POST['re_password'])) { $old_pass=md5($_POST['old_pass']); $new_pass=md5($_POST['new_pass']); $re_pass=md5($_POST['re_pass']); $chg_pwd=mysqli_query($conn, "SELECT * FROM user WHERE username='".$user."'"); $chg_pwd1=mysqli_fetch_array($chg_pwd); $data_pwd=$chg_pwd1['password']; if($data_pwd==$old_pass){ if($new_pass==$re_pass){ $update_pwd=mysqli_query($conn, "UPDATE user SET password='$new_pass' WHERE username='".$user."'"); echo "<script>alert('Password Changed'); window.location='logout.php'</script>"; } else{ echo "<script>alert('Your new and Retype Password is not match'); window.location='changepass.php'</script>"; } } else { echo "<script>alert('Your old password is wrong'); window.location='changepass.php'</script>"; }} ?> <!--********************************** Content body start ***********************************--> <div class="content-body"> <div class="container-fluid"> <div class="row page-titles mx-0"> <div class="col-sm-6 p-md-0"> <div class="welcome-text"> <h4>Change Password</h4> </div> </div> <div class="col-sm-6 p-md-0 justify-content-sm-end mt-2 mt-sm-0 d-flex"> <ol class="breadcrumb"> <li class="breadcrumb-item"><a href="javascript:void(0)">Form</a></li> <li class="breadcrumb-item active"><a href="javascript:void(0)">Change Password</a></li> </ol> </div> </div> <!-- row --> <div class="row"> <div class="col-lg-12"> <div class="card"> <div class="card-header"> </div> <div class="card-body"> <div class="form-validation"> <form class="form-valide" action="" method="post" enctype="multipart/form-data"> <div class="row"> <div class="col-xl-12"> <div class="form-group row"> <label class="col-lg-4 col-form-label" for="val-password">Old Password <span class="text-danger">*</span> </label> <div class="col-lg-6"> <input type="password" class="form-control" id="val-password" name="old_pass" placeholder="Choose a safe one.."> </div> </div> <br> <div class="form-group row"> <label class="col-lg-4 col-form-label" for="val-password"> New Password <span class="text-danger">*</span> </label> <div class="col-lg-6"> <input type="password" class="form-control" id="val-password" name="new_pass" placeholder="New Password"> </div> </div> <br> <div class="form-group row"> <label class="col-lg-4 col-form-label" for="val-confirm-password">Confirm New Password <span class="text-danger">*</span> </label> <div class="col-lg-6"> <input type="password" class="form-control" id="val-confirm-password" required name="re_pass" placeholder="confirm it!"> </div> </div> <br> <div class="col-xl-12"> <button type="submit" name="re_password" class="btn btn-primary">Change Password</button> </div> </div> </div> </form> </div> </div> </div> </div> </div> </div> </div> <!--********************************** Content body end ***********************************--> <!-- Footer --> <?php include 'footer.php';?>