检查重复值后如何将消息传递给index.html?

时间:2018-03-17 11:31:11

标签: php

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?

0 个答案:

没有答案