Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!doctype html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>Untitled Document</title>
- </head>
- <body>
- <?PHP
- $dbhost = "localhost";
- $dbuser = "workshe3_test";
- $dbpass = "cats8000";
- $dbname = "workshe3_test";
- $conn = mysqli_connect($dbhost, $dbuser, $dbpass, $dbname);
- if(!$conn)
- {
- die("Connection failed: " . mysqli_connect_error());
- }
- $first = $_POST["first"];
- $last = $_POST["last"];
- $phone = $_POST["phone"];
- $address = $_POST["address"];
- $toppings = $_POST["toppings"];
- $size = $_POST["size"];
- $pickUpTime = $_POST["pickUpTime"];
- $ConfirmNum = $_POST["ConfirmNum"];
- $sql = "INSERT INTO orders (first, last, phone, address, toppings, size, pickUpTime, ConfirmNum) VALUES ('$first', '$last', '$phone', '$address', '$toppings', '$size', '$pickUpTime', '$ConfirmNum')";
- if (mysqli_query($conn, $sql))
- {
- echo "New post created successfully";
- Redirect('Confirmation.php');
- }
- else
- {
- echo "Error: " . $sql . "<br>" . mysqli_error($conn);
- }
- mysqli_close($conn);
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement