本文整理汇总了PHP中DB_Functions::isStaffExisted方法的典型用法代码示例。如果您正苦于以下问题:PHP DB_Functions::isStaffExisted方法的具体用法?PHP DB_Functions::isStaffExisted怎么用?PHP DB_Functions::isStaffExisted使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DB_Functions
的用法示例。
在下文中一共展示了DB_Functions::isStaffExisted方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
$Staff_Email = $_POST['staff_email'];
$Staff_dob = $_POST['staff_dob'];
$Staff_Gender = $_POST['staff_gender'];
$Staff_Phone = $_POST['staff_phone'];
$Staff_Addr1 = $_POST['staff_addr1'];
$Staff_Addr2 = $_POST['staff_addr2'];
$Staff_Postal_Code = $_POST['staff_postal_code'];
$Dept_id = $_POST['dept_id'];
$Designation_id = $_POST['designation_id'];
$Staff_Joining_Date = $_POST['staff_joining_date'];
$Login_uname = $_POST['staff_name'];
$Login_name = $_POST['staff_email'];
$Login_password = 'staffemp';
$Login_type = 'staff';
// check if staff already exists
if ($db->isStaffExisted($Staff_Email)) {
// staff already exists
$response["response"] = 0;
$response["message"] = $Staff_Email . "already exists";
echo json_encode($response);
} else {
// create a new user$Cust_Name, $Cust_Email, $Cust_Phone,$Cust_Address,$Cust_City,$Cust_State
//$user = $db->insertLaboratory($Br_ID, $Lab_Name);
$user = $db->insertStaff($Br_id, $Staff_Name, $Staff_Email, $Staff_dob, $Staff_Gender, $Staff_Phone, $Staff_Addr1, $Staff_Addr2, $Staff_Postal_Code, $Dept_id, $Designation_id, $Staff_Joining_Date);
if ($user) {
// staff stored successfully
$response["response"] = 1;
$user = mysql_query("SELECT * from Staff_master WHERE Staff_Email = '{$Staff_Email}'");
$user_data = mysql_fetch_array($user);
$no_rows = mysql_num_rows($user);
if ($no_rows == 1) {