<?php  
$connect = mysqli_connect("localhost:3306", "root", "", "orthodox");  
$data = json_decode(file_get_contents("php://input"), true);  
if(is_array($data) && count($data) > 0)  
{  
    $don_type = mysqli_real_escape_string($connect, $data['Donation_type1']);       
    $names = mysqli_real_escape_string($connect, $data['Username1']);
    //$payment = mysqli_real_escape_string($connect, $data->paypal);      
    $user_name = mysqli_real_escape_string($connect, $data['vards']);
    $user_mail = isset($data['epasts']) ? mysqli_real_escape_string($connect, $data['epasts']) : '';
    $user_phone = mysqli_real_escape_string($connect, $data['tel']);
      
    $query = "CALL `TEST1`('$don_type', '$names', '', '$user_name', '$user_mail', '$user_phone')";  
    if(mysqli_query($connect, $query))  
    {  
        echo "Data Inserted...";  
    }  
    else  
    {  
        echo 'Error';  
    }  
}  
?>
