<?php

require_once "config.php";

$pwd=$_POST['pwd'];
$new_pwd=$_POST['new_pwd'];
if($pwd!=$new_pwd){
   die("Password mismatch"); 
}
$sql="update admin_login set pwd='".$new_pwd."'";
$query=mysqli_query($con,$sql);
if($query==false){
    die(mysqli_error($con));
}
echo mysqli_affected_rows($con);