-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinit-edituser.php
32 lines (23 loc) · 962 Bytes
/
init-edituser.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
require_once("database_connection.php");
$user = $_GET["user"];
$server = "localhost";
$username = "root";
$password = "";
$dbname = "eco_patrol";
$conn = connect_database($server, $username, $password, $dbname);
$query = "SELECT * FROM pihak_berwenang WHERE username='$user'";
$result = mysqli_query($conn, $query);
$row = mysqli_fetch_array($result);
$nama = $row["nama"];
$jabatan = $row["jabatan"];
$email = $row["email"];
echo "
<td><input type='checkbox'></td>
<td>$user</td>
<td><input type='text' value='$nama' name='nama' id='nama'></td>
<td><input type='text' value='$jabatan' name='jabatan' id='jabatan'></td>
<td><input type='text' value='$email' name='email' id='email'></td>
<td><input type='image' src='images/icn_alert_success.png' title='OK' onclick='return editUser(\"$user\", \"nama\", \"jabatan\", \"email\");'>
<input type='image' src='images/icn_alert_error.png' title='Cancel' onclick='return showUsers(0,0);'></td> ";
?>