本文整理汇总了PHP中validator::validateEmail方法的典型用法代码示例。如果您正苦于以下问题:PHP validator::validateEmail方法的具体用法?PHP validator::validateEmail怎么用?PHP validator::validateEmail使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类validator
的用法示例。
在下文中一共展示了validator::validateEmail方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: database
}
if (isset($_SESSION['clientID'])) {
$clientID = $_SESSION['clientID'];
$_SESSION['clientname'] = $clientname;
$_SESSION['contactname'] = $contactname;
$_SESSION['username2'] = $username;
$_SESSION['emailadd'] = $emailadd;
$_SESSION['phoneno'] = $phoneno;
$_SESSION['faxno'] = $faxno;
$_SESSION['extrainfo'] = $extrainfo;
$_SESSION['address'] = $address;
$_SESSION['status'] = $status;
}
$db = new database();
$mh = new validator();
if (!$mh->validateEmail($emailadd)) {
// TODO: changeme
echo '<script>alert( "Please input a valid e-mail address." );history.go(-1);</script>';
exit;
}
if (isset($_POST['task'])) {
switch ($_POST['task']) {
case 'add':
$sql = "";
break;
case 'edit':
$sql = "select * from corporate_partners where username = '{$username}' and clientID !=" . $_SESSION['clickclientID'];
$db->query($sql);
$db->fetcharray();
if ($db->getnumrows() > 0) {
echo '<script>alert("Username is already taken by someone, Please choose another username.");history.go(-2);</script>';