Guest User

part u need

a guest
Feb 25th, 2016
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. <?php
  2. if ($_SERVER["REQUEST_METHOD"] == "POST") {
  3. if ($error != true ) {
  4. //connect to mysql database
  5. $servername = "localhost";
  6. $username = "wessamallami";
  7. $password = "circle8";
  8. $dbname = "wallami";
  9. $conn = new mysqli($servername, $username, $password, $dbname);
  10. if ($conn->connect_error) {
  11. die("Connection failed: " . $conn->connect_error);
  12. }
  13. $sql = "INSERT INTO Reservations (Customer_Name, Game_ID, Start_Date, Number_Of_Days_Reserved)
  14. VALUES ('".$name."', '".$gameID."', '".$startDate."', '".$NoOfDays."')";
  15. if ($conn->multi_query($sql)) {
  16. echo "<br> Reservation Saved.";
  17. } else {
  18. echo "Error: " . $sql . "<br>" . $conn->error;
  19. }
  20. $conn->close();
  21. }
  22. }
  23. ?>
Add Comment
Please, Sign In to add comment