zoukankan      html  css  js  c++  java
  • layui注册页面事例和日志的方法

    layui注册页面的事例:

    layui.use('layer', function (){
            var layer = layui.layer;
            layer.open({
                title: '注册页面',
                area: ['400px', '360px'],
                content:'<span style="float:left">账号:&nbsp&nbsp&nbsp&nbsp</span>' +
                        '<input type="text" name="text" id="uid" placeholder="请输入账号" autocomplete="off" class="layui-input" style="margin-top:-5px" />' +
                        '<span style="float:left;margin-top:20px">用户名:</span>' +
                        '<input type="text" name="text" id="name" placeholder="请输入用户名" autocomplete="off" class="layui-input" style="margin-top:15px" />' +
                        '<span style="float:left;margin-top:23px">密码:&nbsp&nbsp&nbsp</span>' +
                        '<input type="password" name="password" id="pwd" placeholder="请输入密码" autocomplete="off" class="layui-input" style="margin-top:15px" />' +
                        '<input type="password" name="password" id="pswd" placeholder="请再次输入密码" autocomplete="off" class="layui-input" style="margin-top:15px;margin-left:0px" />',
                 yes: function (index, layero){
                  }

    定义一个日志的方法:
    function movieLog($str){
        $db = new MySQLi("localhost","root","","z_0705");
        !mysqli_connect_error() or die("数据库连接错误");
        $db->query("set names utf8");
        $uid = $_SESSION['uid'];
        $name= $_SESSION["uname"] ;
        $time = date('Y-m-d H:i:s');
        $sql = "insert into movie_log(uid,uname,time,str)values('$uid','$name','$time','$str')";
        $db->query($sql);
    }

  • 相关阅读:
    编程ING:人人都能学会程序设计
    以拯救之因
    使用交互环境
    使用交互环境 连载3
    深入理解Oracle Exadata
    字符编码
    多语境的操作
    挖掘用户需求
    神一样的产品经理——基于移动与互联网产品实践
    产品各类型之间的关系
  • 原文地址:https://www.cnblogs.com/Prinlily/p/9649390.html
Copyright © 2011-2022 走看看