Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
File Manager
/
admin
:
change_passwordexe.php
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?php include "db_connect.php"; if($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST['submit']) && $_POST['submit']=='Change Password') { $newPassword = !empty($_POST['newPassword'])?$_POST['newPassword']:''; $newPassword=check_input($con,$newPassword); //$newPassword =md5($newPassword); $stmt = $con->prepare('UPDATE `admin` SET `password` = ? WHERE `id` = ? '); $stmt->bind_param('ss', $newPassword, $_SESSION['userid']); $result = $stmt->execute(); $stmt->store_result(); if($stmt) { $_SESSION['msg'] = 'data_updated'; header("location: change-password.php"); } else { header("location: change-password.php");exit; } $stmt->close(); } ?>