Skip to content
Snippets Groups Projects
Commit 544070dc authored by Akmal Fadlurohman's avatar Akmal Fadlurohman
Browse files

Memperbaiki prosedur menambahkan lokasi driver

parent 7119085d
1 merge request!45OneHundred - 13515005 - Husnulzaki Wibisono Haryadi
......@@ -32,9 +32,9 @@
</div>
<div class="add_loc_frame">
<h2> Add New Location</h2>
<form name="add_location" action="">
<form name="add_location" action="updateLocation.php" method="POST">
<input type="text" name="new_location">
<input type="text" name="hidden_userid" style="display: none;">
<input type="text" id="hidden_userid" name="hidden_userid" style="display: none;">
<input type="submit" value="ADD" class="button green add">
</form>
</div>
......
......@@ -40,7 +40,9 @@
echo "</br><strong>".$row['username']."</strong></br>";
echo $row['name']."</br>";
if ($row['status'] == "driver") {
echo "driver | Rating (xxx Votes)</br>";
echo "Driver | Rating (xxx Votes)</br>";
} else {
echo "No-Driver</br>";
}
echo $row['email']."</br>";
echo $row['phone']."</br>";
......
......@@ -4,9 +4,9 @@
include '../database/dbconnect.php';
$user_id = $_POST['hidden_userid'];
$new_loc = $_POST['new_location'];
$query = mysqli_query($con,"INSERT INTO user (driver_id,pref_loc) VALUES ('$user_id', '$new_loc')") or die(mysqli_error());
$query = mysqli_query($con,"INSERT INTO driver_prefloc (driver_id,pref_loc) VALUES ('$user_id', '$new_loc')") or die(mysqli_error($con));
if ($query) {
header("Location: ../profile/profile.php?id=$user_id");
header("Location: edit_location.php?id=$user_id");
}
}
}
......
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