Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64
Your IP : 18.217.241.235
<?php
include ("../database.php");
$user = $_SESSION['USER'];
$password = $_POST['password'];
//check weather user exist
$update_usr = "update masuser set fpasswd = '{$password}' where fusername = '{$user}'";
$result = mysqli_query($conn,$update_usr);
if($result)
{
$response['status'] = "success";
$response['msg'] = "Updated password Successfully";
echo json_encode($response);
}
else
{
$response['status'] = "error";
$response['msg'] = "Error while Updating";
echo json_encode($response);
}
|