Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if ($_SERVER["REQUEST_METHOD"] == "POST") {
- if ($error != true ) {
- //connect to mysql database
- $servername = "localhost";
- $username = "wessamallami";
- $password = "circle8";
- $dbname = "wallami";
- $conn = new mysqli($servername, $username, $password, $dbname);
- if ($conn->connect_error) {
- die("Connection failed: " . $conn->connect_error);
- }
- $sql = "INSERT INTO Reservations (Customer_Name, Game_ID, Start_Date, Number_Of_Days_Reserved)
- VALUES ('".$name."', '".$gameID."', '".$startDate."', '".$NoOfDays."')";
- if ($conn->multi_query($sql)) {
- echo "<br> Reservation Saved.";
- } else {
- echo "Error: " . $sql . "<br>" . $conn->error;
- }
- $conn->close();
- }
- }
- ?>
Add Comment
Please, Sign In to add comment