本文整理汇总了PHP中People::switchCampusAmbassador方法的典型用法代码示例。如果您正苦于以下问题:PHP People::switchCampusAmbassador方法的具体用法?PHP People::switchCampusAmbassador怎么用?PHP People::switchCampusAmbassador使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类People
的用法示例。
在下文中一共展示了People::switchCampusAmbassador方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: json_encode
$arr[] = 'Missing parameter in the request : responsibility';
echo json_encode($arr);
die;
}
$involvement = null;
if (isset($_POST['involvement']) && !empty($_POST['involvement'])) {
$involvement = $_POST['involvement'];
} else {
header('Content-type: application/json');
$arr = array();
$arr[] = -1;
$arr[] = 'Missing parameter in the request : involvement';
echo json_encode($arr);
die;
}
$threethings = null;
if (isset($_POST['threethings']) && !empty($_POST['threethings'])) {
$threethings = $_POST['threethings'];
} else {
header('Content-type: application/json');
$arr = array();
$arr[] = -1;
$arr[] = 'Missing parameter in the request : threethings';
echo json_encode($arr);
die;
}
$conn = mysqli_connect(SERVER_ADDRESS, USER_NAME, PASSWORD, DATABASE);
$result = People::switchCampusAmbassador($anwid, $email, $address, $degree, $graduation, $responsibility, $involvement, $threethings, $conn);
mysqli_close($conn);
header('Content-type: application/json');
echo json_encode($result);