本文整理匯總了PHP中country::setid方法的典型用法代碼示例。如果您正苦於以下問題:PHP country::setid方法的具體用法?PHP country::setid怎麽用?PHP country::setid使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類country
的用法示例。
在下文中一共展示了country::setid方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: member
} else {
$exists_email = motor::exists_email($_POST["txtsignup_email"]);
if ($exists_email == true) {
$error_signup_email = exists_email;
} else {
$member = new member();
$member->setusername($_POST["txtsignup_username"]);
$member->setname($_POST["txtsignup_name"]);
$member->setemail($_POST["txtsignup_email"]);
$member->setpassword($_POST["txtsignup_password"]);
$member->setsex($_POST["cmbiam"]);
$member->setbirthday_day($_POST["cmbbirthday_day"]);
$member->setbirthday_month($_POST["cmbbirthday_month"]);
$member->setbirthday_year($_POST["cmbbirthday_year"]);
$country = new country();
$country->setid($_POST["cmbcountry"]);
$member->setcountry($country);
motor::signup($member);
$_SESSION["signup_thanks"] = $_POST["txtsignup_email"];
header("Location: signup_ok.php");
}
}
}
}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php
示例2: create_country
protected static function create_country($obj)
{
$country = new country();
$country->setid($obj["id"]);
$country->setcountry($obj["country"]);
return $country;
}