标题不发送

时间:2018-04-18 02:07:47

标签: php sql

enter image description here标题没有被发送 - 我相信,不确定问题是什么试图删除它们进行测试但没有运气,仍然没有工作。表单只是不断重新加载,不处理任何数据。为了这篇文章,连接细节显而易见。

<?php
    error_reporting(E_ALL);
    ini_set('display_errors', 1);
    if(isset($_POST["submit"]))


     if(isset($_POST['email'], $_POST['password'])) {
        $email = $_POST['email'];
        $password = $_POST['password'];



        $stmt = mysqli_prepare($conn, "SELECT firstname, Clientid, password FROM Client WHERE email=?");

        mysqli_stmt_bind_param($stmt, "s", $email);
        mysqli_stmt_execute($stmt);
        mysqli_stmt_bind_result($stmt, $result_forename, $result_id, $result_password);
        while(mysqli_stmt_fetch($stmt)){

                if(password_verify($password, $result_password))
          {
            // Store Session Data
             // $_SESSION['email']= $email;  // Initializing Session with value of PHP Variable


              //Create cookie, with forename value
              //$cookie_name = "name";
              //$cookie_value = $result_forename;
              //setcookie($cookie_name, $cookie_value, time() + (86400 * 30), "/"); // 86400 = 1 day





        //admin status check
        if($result_id >= 1){


          header('Location: appointment.php'); exit();

          echo "Welcome " . $result_forename;
        }
        else {

          echo"Error, please register first before attempting to login";




        }

          }
          }



    }
    ?>

此处是尝试重定向到

的约会页面
    <?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
if(isset($_POST["submit"])){


     $staffid=$_POST['Staffid'];
     $clientid=$_POST['Clientid'];
     $urgency=$_POST['Urgency'];
     $concern=$_POST['Concern'];
     $aptdate=$_POST['Apt_date'];
     $apttime=$_POST['Apt_time'];
     $aptduration=$_POST['Apt_duration'];
     $location=$_POST['Location'];

     //prepared statement
    $stmt = mysqli_prepare($conn, "INSERT INTO Appointment (Staffid, Clientid, Urgency,Concern,Apt_date,Apt_time,Apt_duration,Location ) VALUES (?,?,?,?,?,?,?,?)");

    //dealing with the parameters
        mysqli_stmt_bind_param($stmt, "iissiiis", $staffid, $clientid, $urgency,$concern, $aptdate, $apttime, $aptduration, $location);
            if ($stmt->execute()) { 
               echo"Appointment has been booked";
            } else {
               echo"Appointment hasn't been booked";
            }



}
?>

0 个答案:

没有答案