本文整理汇总了PHP中validation::checkEqual方法的典型用法代码示例。如果您正苦于以下问题:PHP validation::checkEqual方法的具体用法?PHP validation::checkEqual怎么用?PHP validation::checkEqual使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类validation
的用法示例。
在下文中一共展示了validation::checkEqual方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: unlink
<?php
if (mysqli_num_rows($users->getUserInfoById($u_id)) == "1") {
$rowUser = mysqli_fetch_array($users->getUserInfoById($u_id));
if (isset($_POST['save_btn'])) {
$name = $_POST['name'];
$ext = $_POST['ext'];
$roomNo = $_POST['roomNo'];
$serverpass = $rowUser['pass'];
$oldpassword = $_POST['oldPassword'];
$newpassword = $_POST['newPassword'];
$password = $rowUser['pass'];
$pic_name = $rowUser['pic_path'];
if (trim($name) != "" and trim($ext) != "" and trim($roomNo) != "0") {
if (isset($oldpassword)) {
if ($validate->checkNotNull($oldpassword) and $validate->checkNotNull($newpassword)) {
if ($validate->checkEqual(md5($oldpassword), $serverpass)) {
$password = md5($newpassword);
}
}
}
if (isset($_FILES["myfile"])) {
if ($validate->checkImage()) {
unlink("uploads/users/" . $rowUser['pic_path']);
$pic_name = time() . "_" . $_FILES["myfile"]["name"];
move_uploaded_file($_FILES["myfile"]["tmp_name"], "uploads/users/" . $pic_name);
}
$putValue = $users->updateUser($name, $ext, $roomNo, $pic_name, $password, $u_id);
if ($putValue) {
header("location:editUser.php?edit=" . $u_id . "&Done");
} else {
echo "Some Thing Wrong happen please Try Again Later";
示例2: time
$roomNo = $_POST['roomNo'];
$ext = $_POST['ext'];
$mail = $_POST['mail'];
$secret = $_POST['secret'];
$password = $_POST['password'];
$cpassword = $_POST['password_confirm'];
#Check For Gender Exist Or No
if (isset($_POST['ugender'])) {
$gender = $_POST['ugender'];
} else {
$gender = '';
}
//echo strlen($fname);
if (trim($name) != "" and trim($roomNo) != "" and trim($secret) != "" and trim($ext) != "" and trim($mail) != "" and trim($password) != "" and trim($cpassword) != "") {
if ($validate->checkMail($mail)) {
if ($validate->checkEqual($password, $cpassword)) {
if (!$validate->isUserExist($mail)) {
if (isset($_FILES["myfile"])) {
if ($validate->checkImage()) {
$pic_name = time() . "_" . $_FILES["myfile"]["name"];
move_uploaded_file($_FILES["myfile"]["tmp_name"], "uploads/users/" . $pic_name);
$putValue = $users->regist($name, $mail, $ext, $pic_name, $password, $roomNo, $secret);
if ($putValue) {
echo "Insert Complete";
header("location:addUser.php?action=New User Added To Our DataBase");
} else {
echo "<div class='alert alert-danger '>Some Thing Wrong happen please Try Again Later</div>";
}
} else {
echo "<div class='alert alert-danger '>Invalied Picture</div>";
}