Server IP : 148.135.140.132 / Your IP : 3.129.218.43 Web Server : LiteSpeed System : Linux in-mum-web1116.main-hosting.eu 4.18.0-553.34.1.lve.el8.x86_64 #1 SMP Thu Jan 9 16:30:32 UTC 2025 x86_64 User : u496275626 ( 496275626) PHP Version : 8.1.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/u496275626/domains/apnadigitalsolution.com/public_html/ayurherbs/ |
Upload File : |
<?php include 'include/include.php'; addpage('header.php'); ?> <div class="breadcrumb bg-white playfair"> <div class="container"> <div class="crumb"> <a href="index">Home</a> <span>/</span> <a href="javascript:void(0)">Forget Password</a> <!-- <span>/</span> --> </div> </div> </div> <section class="section mb-3"> <div class="container"> <div class="card bg-light playfair py-3 px-2"> <form action="" method="post" id="forgotpasswordform"> <div class="row"> <div class="mx-auto col-md-6"> <div class="form-group"> <label class="bg-light">Email</label> <input type="email" placeholder="Enter Email" name="email" required> </div> <div class="form-group"> <button class="w-100 btn btn-success" id="forgotpasswordformBtn">Send OTP</button> </div> </div> </div> </form> <form action="" method="post" hidden id="otpform"> <div class="row"> <div class="mx-auto col-md-6"> <div class="form-group"> <label class="bg-light">OTP</label> <input type="number" placeholder="Enter OTP" name="forgototp" required> </div> <div class="form-group"> <button class="w-100 btn btn-success">Send OTP</button> </div> </div> </div> </form> </div> </div> </section> <?php addpage('footer.php') ?> <script type="text/javascript"> $(document).ready(function (e){ $("#forgotpasswordform").on('submit',(function(e){ e.preventDefault(); form = $(this); $.ajax({ url: "admin/forgotpassword.php", type: "POST", data: new FormData(this), contentType: false, cache: false, processData:false, success: function(data){ $('#forgotpasswordformBtn').html('Verifing...'); console.log(data); dataobj = JSON.parse(data); if (dataobj.code == 200) { swal("OTP Sent to your registered email account","","success"); console.log(dataobj.otp); form.addClass('d-none'); $('#otpform').removeAttr('hidden'); } else{ swal(dataobj.msg,"","error"); $('#forgotpasswordformBtn').html('Submit'); } } }); })); $("#otpform").on('submit',(function(e){ e.preventDefault(); $.ajax({ url: "admin/verifyotp.php", type: "POST", data: new FormData(this), contentType: false, cache: false, processData:false, success: function(data){ if (data == 200) { swal("OTP Varified","New Password has sent to your email","success"); setTimeout(function () { window.location.href="login.php"; },1000); } else{ swal(data,"","error"); } } }); })); }); </script>