當前位置: 首頁>>代碼示例>>PHP>>正文


PHP dbconnection::getRoomId方法代碼示例

本文整理匯總了PHP中dbconnection::getRoomId方法的典型用法代碼示例。如果您正苦於以下問題:PHP dbconnection::getRoomId方法的具體用法?PHP dbconnection::getRoomId怎麽用?PHP dbconnection::getRoomId使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在dbconnection的用法示例。


在下文中一共展示了dbconnection::getRoomId方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1:

}
$_user = "../layout/users.php";
$edtuid = $_POST['edtuid'];
$rid = $_POST['rid'];
$uname = $_POST['username'];
$email = $_POST['email'];
$rname = $_POST['rnum'];
$ext = $_POST['ext'];
$fname = $_POST['fname'];
$lname = $_POST['lname'];
if ($vobj->ifUserExists($uname)) {
    echo "Ussser already exists";
    exit;
}
if ($vobj->ifEmailExists($email)) {
    echo "email already exists";
    exit;
}
// if($pwd != $cpwd){
// 	echo "Passwords did not match";
// 	exit;
// }
if (!$vobj->ifRoomExists($rname)) {
    echo "Room number : " . $uname . " does not exists in the system";
    exit;
}
$rid = $dbobj->getRoomId($rname);
echo "before";
$dbobj->Update("update user set `uname`='{$uname}',`email`='{$email}',`rid`='{$rid}',`ext`='{$ext}' where `uid`='{$edtuid}'");
echo "after";
header("location:" . $_user);
開發者ID:korabieka,項目名稱:PHP_Project,代碼行數:31,代碼來源:edit_user.php

示例2: basename

    echo "User already exists";
    exit;
}
if ($vobj->ifEmailExists($email)) {
    echo "email already exists";
    exit;
}
if ($pwd != $cpwd) {
    echo "Passwords did not match";
    exit;
}
if (!$vobj->ifRoomExists($rnum)) {
    echo "Room number : " . $rnum . " does not exists in the system";
    exit;
} else {
    $rid = $dbobj->getRoomId($rnum);
}
// if($vobj->ifExtExists($ext)){
// 	echo "User already exists";
// 	exit;
// }
// upload image
$target_dir = "../images/user/";
$target_file = $target_dir . basename($_FILES["fileToUpload"]["name"]);
$uploadOk = 1;
$imageFileType = pathinfo($target_file, PATHINFO_EXTENSION);
$imgname = $uname . "." . $imageFileType;
$target_file = $target_dir . $imgname;
// Check if image file is a actual image or fake image
if (isset($_POST["submit"])) {
    $check = getimagesize($_FILES["fileToUpload"]["tmp_name"]);
開發者ID:korabieka,項目名稱:PHP_Project,代碼行數:31,代碼來源:add_user.php


注:本文中的dbconnection::getRoomId方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。