本文整理汇总了PHP中validator::sexvalid方法的典型用法代码示例。如果您正苦于以下问题:PHP validator::sexvalid方法的具体用法?PHP validator::sexvalid怎么用?PHP validator::sexvalid使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类validator
的用法示例。
在下文中一共展示了validator::sexvalid方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: FacebookDriver
<?php
require_once "lib/config.php";
require_once "lib/user.php";
require_once "lib/FacebookDriver.php";
$fb_driver = new FacebookDriver();
$APP_PROFILE = array();
$user = new User();
if (isset($_POST['action']) && $_POST['action'] == "register") {
// Define Validator Object
$validator = new validator();
// Define Parameters
$name = $_POST['name'];
$age = $_POST['age'];
$sex = $validator->sexvalid($_POST['sex']);
$phone = $validator->phonevalid($_POST['phone']);
$email = $validator->emailvalid($_POST['email'], "Invalid Email");
$state = $_POST['state'];
$team = trim($_POST['team']);
$socid = $_POST['socid'];
$params = array('socid' => $socid, 'name' => $name, 'age' => $age, 'sex' => $sex, 'email' => $email, 'phone' => $phone, 'state' => $state, 'team' => $team);
// Create User Object and Register User
$resp = $user->register($params);
if (strstr($resp, "OK")) {
$_SESSION['userid'] = $_POST['socid'];
$_SESSION['teamid'] = $user->userprofile($_POST['socid']);
header("Location: profile.php");
}
} else {
if ($fb_driver->in_session()) {
// Get User