本文整理汇总了PHP中validation::check_empty方法的典型用法代码示例。如果您正苦于以下问题:PHP validation::check_empty方法的具体用法?PHP validation::check_empty怎么用?PHP validation::check_empty使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类validation
的用法示例。
在下文中一共展示了validation::check_empty方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: validation
<?php
ob_start();
include "../config/db_config.inc.php";
include "../config/class_lib.php";
if (!isset($_SESSION)) {
session_start();
}
$username = $_POST['Username'];
$password = $_POST['Password'];
$captcha = $_POST['Captcha'];
$action = $_POST['Action'];
$val = new validation();
if ($val->check_empty($_POST)) {
if ($_POST['Captcha'] == $_SESSION['digit']) {
$username = $mysqli->escape_string($username);
$password = $mysqli->escape_string($password);
$rs = $mysqli->query("select *from admin where uname='{$username}' and pass='{$password}'");
if ($rs->num_rows == 1) {
while ($row = $rs->fetch_array()) {
$_SESSION['user_id'] = $row['id'];
$_SESSION['user_uname'] = $row['uname'];
$_SESSION['user_pass'] = $row['pass'];
$_SESSION['user_fname'] = $row['fname'];
$_SESSION['user_cdate'] = $row['cdate'];
$_SESSION['user_pri'] = $row['privilege'];
$_SESSION['user_des'] = $row['designation'];
$_SESSION['user_pic'] = $row['photo'];
$_SESSION['user_dep'] = $row['dep'];
$_SESSION['user_lname'] = $row['lname'];
$_SESSION['user_abt'] = $row['abt'];