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


PHP users::get_user2方法代碼示例

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


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

示例1: header

        $_SESSION['u_type'] = $result[0]['u_type'];
        $_SESSION['cid'] = $result[0]['cid'];
        $_SESSION['password'] = $_POST[0]['password'];
        $_SESSION['addr'] = $result[0]['addr'];
        $_SESSION['state'] = $result[0]['state'];
        $_SESSION['zip'] = $result[0]['zip'];
        $_SESSION['cc_num'] = $result[0]['cc_num'];
        $_SESSION['city'] = $result[0]['city'];
        header("Location:myaccount.php");
        // redirects
    } else {
    }
} else {
    if (isset($_POST['recovery'])) {
        //get the password for that email.
        $result = $users->get_user2($_POST['email']);
        $password = null;
        if ($result != false) {
            //if email is in database, send the paasword to customer.
            $password = $result[0]['password'];
            $password = $users->generateSalt();
            // Generate new random password for user.
            $set['password'] = $password;
            $cid = $users->get_cid($_POST['email']);
            $key = $cid[0]['cid'];
            $users->modify_customers($set, $key);
            // change password to new random string
            $addresses = array();
            $addresses[] = $_POST['email'];
            // email(array of addresses, message, subject);
            $message = "Your new password with GatorAirlines is " . $password . "<br/> Hope to hear from you soon!!";
開發者ID:NLP-Project,項目名稱:GatorAirlines,代碼行數:31,代碼來源:log_in.php

示例2: users

<?php

include "classes/users.class.php";
include "classes/email.class.php";
//in case user forgot their password.
$users = new users();
$result;
if (!isset($_SESSION)) {
    session_start();
}
if (isset($_SESSION['email'])) {
    $result = $users->get_user2($_SESSION['email']);
} else {
    $result['first_name'] = null;
    $result['last_name'] = null;
    $result['email'] = null;
    $result['addr'] = null;
    $result['city'] = null;
    $result['state'] = null;
    $result['zip'] = null;
}
?>








<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
開發者ID:NLP-Project,項目名稱:GatorAirlines,代碼行數:31,代碼來源:make_res.php


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