-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathedit.php
executable file
·68 lines (58 loc) · 1.84 KB
/
edit.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<?php
include('config.php');
include('cek-login.php');
?>
<!DOCTYPE html>
<html>
<head>
<title> belajar CRUD sederhana </title>
</head>
<body>
<h1> FORM INPUT DATA </h1>
<?php
$id = $_GET['id'];
$query = mysql_query("select * from user where user_id='$id'") or die(mysql_error());
$data = mysql_fetch_array($query);
?>
<form name="update_data" action="update.php" method="post">
<input type="hidden" name="user_id" value="<?php echo $id; ?>" />
<table border="0" cellpadding="5" cellspacing="0">
<tbody>
<tr>
<td>Username</td>
<td>:</td>
<td><input type="text" name="username" maxlength="20" required="required" value="<?php echo $data['username']; ?>" disabled />
</tr>
<tr>
<td>Password</td>
<td>:</td>
<td><input type="text" name="password" maxlength="20" required="required" value="<?php echo $data['password']; ?>" />
</tr>
<tr>
<td>Fullname</td>
<td>:</td>
<td><input type="text" name="fullname" maxlength="100" required="required" value="<?php echo $data['fullname']; ?>" />
</tr>
<tr>
<td>Email</td>
<td>:</td>
<td><input type="email" name="email" required="required" value="<?php echo $data['email']; ?>" />
</tr>
<tr>
<td>Agama</td>
<td>:</td>
<td><input type="text" name="agama" required="required" value="<?php echo $data['agama']; ?>" />
</tr>
<tr>
<td>Nomor HP</td>
<td>:</td>
<td><input type="text" name="no_hp" maxlength="14" required="required" value="<?php echo $data['no_hp']; ?>" />
</tr>
<tr>
<td align="right" colspan="3"><input type="submit" name="submit" value="Simpan"/></td>
</tr>
</table>
</form>
<a href="view.php">Lihat Data </a>
</body>
</html>