当前位置: 首页>>代码示例>>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;未经允许,请勿转载。