本文整理匯總了PHP中validation::IsValidateemail方法的典型用法代碼示例。如果您正苦於以下問題:PHP validation::IsValidateemail方法的具體用法?PHP validation::IsValidateemail怎麽用?PHP validation::IsValidateemail使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類validation
的用法示例。
在下文中一共展示了validation::IsValidateemail方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: validation
<?php
require_once 'filehead.php';
//include filehead file
if (isset($_SESSION['userid'])) {
if ($_SESSION['type'] == 0) {
require_once 'helper/Validation.php';
//email validation
$smarty->assign('CSS_URL', CSS_URL);
$smarty->display('header.tpl');
$smarty->assign('username', $_SESSION['username']);
$smarty->display('userheader.tpl');
if (isset($_POST['submit'])) {
$valid = new validation();
if ($valid->IsValidateemail($_POST['email']) && $_POST['username'] != NULL && $_POST['password'] != NULL && $_POST['contact'] != NULL && $_POST['address'] != NULL && $_POST['name'] != NULL && $_POST['department'] != NULL && $_POST['salary'] != NULL) {
$login = new login();
$login->add($_POST['username'], $_POST['password'], 1);
//adding record to login table
$userid = $login->getId($_POST['username']);
$staff = new staff();
$staff->add($userid, $_POST['email'], $_POST['username'], $_POST['contact'], $_POST['address'], $_POST['name'], $_POST['department'], $_POST['salary']);
//adding record to staff table
} else {
echo "COMPLETE INFORMATION NECCESSARY";
}
}
$smarty->display('newstaff.tpl');
//including newstaff template
$smarty->display('footer.tpl');
//include footer file
} else {