Skip to content
Snippets Groups Projects
Commit 5c2eccda authored by Akmal Pratama's avatar Akmal Pratama
Browse files

fix proper data to be sent

parent 465eef30
No related merge requests found
...@@ -38,7 +38,6 @@ ...@@ -38,7 +38,6 @@
<?php <?php
require'pr_ojek_database.php'; require'pr_ojek_database.php';
$driverId = $_POST["id_active_driver"]; $driverId = $_POST["id_active_driver"];
echo "<p>".$driverId."</p>";
$sql = "SELECT username, fullName FROM user WHERE idUser='".$driverId."'"; $sql = "SELECT username, fullName FROM user WHERE idUser='".$driverId."'";
$result=$conn->query($sql); $result=$conn->query($sql);
if ($result){ if ($result){
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
echo " </div>"; echo " </div>";
echo " <div class='driver-information'>"; echo " <div class='driver-information'>";
echo " <form method='POST' action='order_complete.php?id_active=".$_GET["id_active"]."'>"; echo " <form method='POST' action='order_complete.php?id_active=".$_GET["id_active"]."'>";
echo " <input type='hidden' name='active_driver' value=".$driver_pref.">"; echo " <input type='hidden' name='id_active_driver' value=".$driver_id_pref.">";
echo " <button class='ichoosebutton'>I CHOOSE YOU!</button>"; echo " <button class='ichoosebutton'>I CHOOSE YOU!</button>";
echo " </form>"; echo " </form>";
echo " <p class='name'>".$row_pref["fullname"]."</p>"; echo " <p class='name'>".$row_pref["fullname"]."</p>";
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
} }
echo "</div>"; echo "</div>";
//OTHER DRIVERS
$asal = $_POST["picking_point"]; $asal = $_POST["picking_point"];
$tujuan = $_POST["destination"]; $tujuan = $_POST["destination"];
$sql = "SELECT fullname, photoPath, user.idUser FROM user JOIN location WHERE user.idUser = location.idUser AND isDriver = 1 AND (location.name = '".$asal."' OR location.name = '".$tujuan."')"; $sql = "SELECT fullname, photoPath, user.idUser FROM user JOIN location WHERE user.idUser = location.idUser AND isDriver = 1 AND (location.name = '".$asal."' OR location.name = '".$tujuan."')";
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
echo " </div>"; echo " </div>";
echo " <div class='driver-information'>"; echo " <div class='driver-information'>";
echo " <form method='POST' action='order_complete.php?id_active=".$_GET["id_active"]."'>"; echo " <form method='POST' action='order_complete.php?id_active=".$_GET["id_active"]."'>";
echo " <input type='hidden' name='active_driver' value=".$row["idUser"].">"; echo " <input type='hidden' name='id_active_driver' value=".$row["idUser"].">";
echo " <button class='ichoosebutton'>I CHOOSE YOU!</button>"; echo " <button class='ichoosebutton'>I CHOOSE YOU!</button>";
echo " </form>"; echo " </form>";
echo " <p class='name'>".$row["fullname"]."</p>"; echo " <p class='name'>".$row["fullname"]."</p>";
......
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