

<?php



                error_reporting(E_ALL);
                ini_set('display_errors', 1);
                
                include('../config/config.php');
                
                //collect the input details
                $mainpwd = trim($_POST['mainpwd']);
                $institution = trim($_POST['InstutionID']);
                $usertype = trim($_POST['usertype']);
                $UserID = trim($_POST['UserID']);
                
                 $password = md5(trim($mainpwd));
                 
                 
                 $prosupdatepwdhere = mysqli_query($link, "UPDATE `userlogin` SET `UserPassword`='$password' WHERE `UserID`='$UserID' AND `UserType`='$usertype'");
                
                if($prosupdatepwdhere == true)
                {
                    
                    echo 'success';
                    
                }else
                {
                    
                    echo 'failed';
                }
                
                
                
                
?>