小编fi5*_*500的帖子

没有错误但是,我的记录没有添加到我的数据库中

我是PHP和MySQL的新手,我已经为此工作了三天,这个问题让我很难过.我没有错误,也没有向我的数据库添加任何查询.在页面register.php队列之后,它应该加载带有文本说明的login.php Registered,但它是空白的,没有记录添加到数据库中.

<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Untitled Document</title>

<?php

$page_title = 'Register';
if( $_SERVER['REQUEST_METHOD'] == 'POST')
{
    include_once "connect.php";

    $errors = array();
    if( empty( $_POST['user_id']))
    {
        $errors[] = 'Enter your user ID.';
    }
    else
    {
        $ui = mysqli_real_escape_string($db_name, trim($_POST['user_id']));
    }
    if ( empty($POST['pass1']))
    {
        if($_POST['pass1'] != $_POST['pass2'])
        { 
            $errors[] = 'Passwords do not match.';
        }
        else
        {
            $fn = mysqli_real_escape_string($db_name, trim($_POST['pass1']));
        }
    }
    else
    {    
        $errors[] = 'Enter your Password.';
    }
    if (empty($errors))
    {
        $q = "INSERT …
Run Code Online (Sandbox Code Playgroud)

html php mysql mysqli

0
推荐指数
1
解决办法
119
查看次数

标签 统计

html ×1

mysql ×1

mysqli ×1

php ×1