我是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)