the card has been wrong in ERROR all day. Ask the bosses for help.
the core error report is shown in the figure:
the complete code is here:
<?php
header("Content-Type:textml;charset=utf-8");
$username="";
//
$account=$_POST["account"];
$password=$_POST["password"];
$db=new mysqli("localhost","root","12345678","newsmanage");
//
$query1=$db->prepare("SELECT account FROM user");
$query1->bind_result($theaccount);
$query1->execute();
while($query1->fetch()) {
if ($account == $theaccount) {
echo "<script>alert("");location.href="register.html"</script>";
exit();
}
}
//
$add=$db->prepare("INSERT INTO user VALUES (null,"general",null,?,?)");
$add->bind_param("ss",$account, $password);
$add->execute();
//IDID
$query2=$db->prepare("SELECT userid FROM user WHERE account="$account"");
$query2->bind_result($userid);
$query2->execute();
$query2->fetch();
//username
$edit=$db->prepare("UPDATE user SET username=? WHERE account=?");
$edit->bind_param("ss",$username,$account);
$edit->execute();
//:Call to a member function bind_param() on boolean in
echo "<script>alert("");location.href="../login/login.html"</script>";