if (isset($_POST['send'])) {
    $uname = $_POST['mail'];
    $param12 = array('UserName' => "{$uname}");
    $client12 = new soapclient('http://etypeservices.com/service_GetPublicationIDByUserName.asmx?WSDL');
    $response12 = $client12->GetPublicationID($param12);
    //echo "<pre>";
    //print_r($response12);
    //echo "</pre>";
    if ($response12->GetPublicationIDResult == -9) {
        $msg = "Invalid UserName ";
    } else {
        if ($response12->GetPublicationIDResult == 3053) {
            $param = array('UserName' => $uname);
            $client = new soapclient('http://etypeservices.com/service_ForgetPassword.asmx?WSDL');
            try {
                $response = $client->ForgetPassword($param);
                if ($response->ForgetPasswordResult == 1) {
                    $msg = "Credentials have been sent to your registered email";
                } else {
                    $msg = "User is Not Registered For This Publication";
                }
            } catch (Exception $e) {
                echo '' . $e->getMessage();
            }
        } else {
            $msg = "User Not Exists";
        }
    }
}
?>