SHARE
TWEET

Untitled

skidd0 Apr 26th, 2019 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if($_SERVER["REQUEST_METHOD"] == "POST"){
  2.     $sql = "INSERT INTO question_responses (q_id, u_id, response, score, timestamp) VALUES (?, ?, ?, ?, ?)";
  3.     if($stmt = $mysqli->prepare($sql)){
  4.         $stmt->bind_param("iisii", $p_q_id, $p_u_id, $p_response, $p_score, $p_timestamp);
  5.  
  6.         $p_q_id = $q_id;
  7.         $p_u_id = $u_ud;
  8.         $p_response = $response;
  9.         $p_score = $score;
  10.         $p_timestamp = $timestamp;
  11.  
  12.         if($stmt->execute()){
  13.             header("location: question_two.php");
  14.         } else{
  15.             echo $sql;
  16.             echo "Something went wrong. Please try again later..";
  17.         }
  18.         $stmt->close();
  19.     }
  20.     $mysqli->close();
  21. }
  22. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top