Advertisement
Guest User

Untitled

a guest
Dec 9th, 2016
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. <?php
  2.  
  3. require "init.php";
  4.  
  5. $name="Sarin";
  6. $sex=" male";
  7. $age=" 27";
  8. $phone=" 222";
  9. $meal=" veg";
  10. $card_no="123456789101";
  11. $Train_id="701";
  12. $seat_type="1st class";
  13. $sql_query="insert into user PASSENGER($name,$sex,$age,$phone,$meal,$card_no,$Train_id);";
  14. $resourcesbuilt="select Fare from SEAT,Train_seat_type where SEAT.Train_id=Train_seat_type.Train_id Seat_type=$seat_type;";
  15. $sql_query1="update Account set amount=amount-$resourcesbuilt where Card_no=$card_no ";
  16.  
  17. if(mysqli_query($con,$sql_query,$sql_query1,$resourcesbuilt))
  18. {
  19. echo "yahoo";
  20. }
  21. else
  22. {
  23. echo "sad";
  24. }
  25. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement