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);
}

转载于:https://www.cnblogs.com/Prinlily/p/9649390.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值