Skip to content
Snippets Groups Projects
Commit bf7f0689 authored by Husnulzaki Wibisono Haryadi's avatar Husnulzaki Wibisono Haryadi
Browse files

Create handler to insert order data to db

parent 25587cc1
1 merge request!45OneHundred - 13515005 - Husnulzaki Wibisono Haryadi
<?php
include '../database/dbconnect.php';
if ($_SERVER["REQUEST_METHOD"] == "POST") {
}
$cust_id = $_POST['customer'];
$driver_id = $_POST['selected_driver'];
$pick_city = $_POST['picking_point'];
$dest_city = $_POST['destination'];
$score = $_POST['rating'];
$comment = $_POST['comment'];
$date = date("Y-m-d")
$insert_order_query = mysqli_query($con, "
INSERT INTO order (dest_city, pick_city, score, comment, driver_id, cust_id, date)
VALUES ($dest_city, $pick_city, $score, $comment, $driver_id, $cust_id)
") or die(mysqli_error());
header("Location : order.php")
mysqli_close($con);
?>
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment