Action.php
class dataOperation extends Database{
public function check_Duplicate(){
$email = $_POST["email"];
$number = mysqli_query($this->conn,"SELECT Email FROM member where Email='$email'");
if (mysqli_num_rows($number)){
echo "Email is taken"
} else return true;
}
}
$obj = new dataOperation;
if(isset($_POST["submit"])){
if( $obj->check_Duplicate()){
if($obj->insert_record("member",$myArray)){
header("Location: ../index.html");
exit;
};
};
}
我正在尝试将action.php中的错误消息打印到index.html。我如何打印"电子邮件被采取"在index.html而不是action.php?