本文整理汇总了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 {