Skip to content
Snippets Groups Projects
Commit 7bf0d546 authored by Muhammad Umar Fariz Tumbuan's avatar Muhammad Umar Fariz Tumbuan
Browse files
parents 851b1c64 0e64d6a8
1 merge request!45OneHundred - 13515005 - Husnulzaki Wibisono Haryadi
......@@ -31,6 +31,7 @@
$driverinfo_query = mysqli_query($con, "SELECT * FROM user JOIN (SELECT * FROM driver WHERE driver_id='" . $seldrv . "') AS drivert ON user_id = driver_id") or die(mysqli_error());
$driverinfo = mysqli_fetch_assoc($driverinfo_query);
echo $ppoint;
$driver_username = $driverinfo['username'];
$driver_name = $driverinfo['name'];
?>
......@@ -53,7 +54,7 @@
Complete Order
</div>
</div>
<form id="submit_cmplt_ordr" method="post">
<form id="submit_cmplt_ordr" method="post" action="order_handler.php">
<div class="content" id="complete_order">
<h2>
How was it?
......@@ -75,9 +76,14 @@
</div>
<div>
<textarea id="comment" name="comment" form="submit_cmplt_ordr">
</textarea>
</div>
<input type="hidden" name="picking_point" value=<?php echo $ppoint ?>>
<input type="hidden" name="destination" value=<?php echo $dest ?>>
<input type="hidden" name="selected_driver" value=<?php echo $seldrv ?>>
<input type="hidden" name="customer" value=<?php echo $user_id ?>>
<input class="button green" type="submit" name="submit" value="Complete Order">
</div>
</form>
......
<?php
include '../database/dbconnect.php';
$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
<?php
include '../database/dbconnect.php';
if ($_SERVER["REQUEST_METHOD"] == "POST") {
}
?>
\ 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