注意:未定义的索引:第21行的C:\ xampp \ htdocs \ final \ server.php中的用户名
注意:未定义索引:第22行中C:\ xampp \ htdocs \ final \ server.php中的电子邮件
注意:第23行的C:\ xampp \ htdocs \ final \ server.php中的未定义索引:password_1
注意:未定义的索引:第24行的C:\ xampp \ htdocs \ final \ server.php中的password_2
警告:mysqli_fetch_assoc()期望参数1为mysqli_result,在第38行的C:\ xampp \ htdocs \ final \ server.php中给出布尔值
<?php
session_start();
//initlasing variables
$username = "";
$email = "";
$errors = array();
//connect to db
$db = mysqli_connect('localhost','root','','users') or die("could not reach to the database");
//register users
$username = mysqli_real_escape_string($db, $_POST['username']);
$email = mysqli_real_escape_string($db, $_POST['email']);
$password_1 = mysqli_real_escape_string($db, $_POST['password_1']);
$password_2 = mysqli_real_escape_string($db, $_POST['password_2']);