Advertisement
Guest User

Untitled

a guest
Sep 20th, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. <?php
  2. if($_SERVER['REQUEST_METHOD']=='POST'){
  3.  
  4. require_once('../dbConnect.php');
  5.  
  6. $number_plate = $_POST['number_plate'];
  7. $amount = $_POST['amount'];
  8. $name_of_passenger = $_POST['name_of_passenger'];
  9. $phone_no_of_passeneger = $_POST['phone_no_of_passenger'];
  10. $id_no_of_passenger = $_POST['id_no_of_passenger'];
  11. $destination= $_POST['destination'];
  12.  
  13.  
  14. $sql = "SELECT * FROM payment_details WHERE number_plate='$number_plate' and amount='$amount' and name_of_passenger='$name_of_passenger' and phone_no_of_passenger='$phone_no_of_passeneger' and id_no_of_passenger='$id_no_of_passenger' and destination ='$destination'";
  15. $ress = mysqli_query($con,$sql);
  16. if(mysqli_fetch_array($ress)){
  17.  
  18. $sql = "INSERT INTO payment_details VALUES (NULL, '$number_plate', '$amount', '$name_of_passenger', '$phone_no_of_passeneger', '$id_no_of_passenger', '$destination')";
  19.  
  20. }
  21.  
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement