📁 File Manager
Editing:
/home/wedigitalindia/www/voltaicpower.in/admin/reset1.php
<?php include ("connection.php"); if(isset($_POST['submit'])){ $pass=$_POST['pass']; $cpass=$_POST['cpass']; if($pass === $cpass){ $pass = $_POST['pass']; $sql = "UPDATE `login` set `pass` = '$pass' WHERE id='1'"; $query = mysqli_query($con,$sql); if($query){ header("location: login.php"); } } } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <link href="https://fonts.googleapis.com/css?family=Ubuntu" rel="stylesheet"> <meta name="viewport" content="width=device-width, initial-scale=1" /> <link rel="stylesheet" href="path/to/font-awesome/css/font-awesome.min.css"> <title>Reset Password</title> <style> * { margin: 0; padding: 0; box-sizing: border-box; } .form { display: flex; flex-direction: column; gap: 10px; background-color: #072645; padding: 30px; max-width: 450px; width: 100%; border-radius: 20px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif; box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); } h2 { text-align: center; color: white; } ::placeholder { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif; color: white; } .form button { align-self: flex-end; } .flex-column>label { color: white; font-weight: 600; } .inputForm { border: 1.5px solid #ecedec; border-radius: 10px; height: 50px; display: flex; align-items: center; padding-left: 10px; transition: 0.2s ease-in-out; } .input { margin-left: 10px; border-radius: 10px; border: none; width: 85%; height: 100%; background: none; color: white; font-size: 15px; } .input:focus { outline: none; } .inputForm:focus-within { border: 1.5px solid #2d79f3; } .flex-row { display: flex; flex-direction: row; align-items: center; gap: 10px; justify-content: space-between; } .flex-row>div>label { font-size: 14px; color: black; font-weight: 400; } .span { font-size: 14px; margin-left: 5px; color: #2d79f3; font-weight: 500; cursor: pointer; } .button-submit { margin: 20px 0 10px 0; background-color: #ebbe00; border: none; color: black; font-size: 15px; font-weight: 600; border-radius: 10px; height: 50px; width: 100%; cursor: pointer; } .button-submit:hover { background-color: #252727; color: white; } .p { text-align: center; color: black; font-size: 14px; margin: 5px 0; } .btn { margin-top: 10px; width: 30%; height: 50px; border-radius: 10px; display: flex; justify-content: center; align-items: center; font-weight: 500; gap: 10px; border: 1px solid #ededef; background-color: white; cursor: pointer; transition: 0.2s ease-in-out; } .btn:hover { border: 1px solid #2d79f3; } </style> </head> <body> <form class="form" method="post"> <h2>Reset Password</h2> <div class="flex-column"> <label>New Password</label> </div> <div class="inputForm"> <svg xmlns="http://www.w3.org/2000/svg" color="white" width="16" height="16" fill="currentColor" class="bi bi-lock-fill" viewBox="0 0 16 16"> <path d="M8 1a2 2 0 0 1 2 2v4H6V3a2 2 0 0 1 2-2m3 6V3a3 3 0 0 0-6 0v4a2 2 0 0 0-2 2v5a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2" /> </svg> <input type="text" class="input" name="pass" placeholder="Enter Your New Password" required/> </div> <!-- --> <div class="flex-column"> <label> Confirm Password </label> </div> <div class="inputForm"> <svg xmlns="http://www.w3.org/2000/svg" color="white" width="16" height="16" fill="currentColor" class="bi bi-lock-fill" viewBox="0 0 16 16"> <path d="M8 1a2 2 0 0 1 2 2v4H6V3a2 2 0 0 1 2-2m3 6V3a3 3 0 0 0-6 0v4a2 2 0 0 0-2 2v5a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2" /> </svg> <input type="password" class="input" name="cpass" id="myInput" placeholder="Enter Your Confirm Password" required /> <input type="checkbox" onclick="myFunction()" > </div> <button class="button-submit" name="submit">Submit</button> </form> <script> function myFunction() { var x = document.getElementById("myInput"); if (x.type === "password") { x.type = "text"; } else { x.type = "password"; } } </script> </body> </html>
Save
Cancel