-
Notifications
You must be signed in to change notification settings - Fork 0
/
edit_data_mhs.php
162 lines (159 loc) · 8.65 KB
/
edit_data_mhs.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
<?php
session_start();
if(isset($_SESSION['login'])){
?>
<?php
include('admin/koneksi.php');
$id=$_GET['id'];
$show=mysqli_query($koneksi,"SELECT * FROM mhs WHERE id_mhs='$id'");
if(mysqli_num_rows($show)==0){
echo'<script>window.history.back()</script>';
}else{
$hasil=mysqli_fetch_assoc($show);
}
?>
<!DOCTYPE html>
<html prefix="og: http://ogp.me/ns#" class="js flexbox canvas canvastext webgl no-touch geolocation postmessage no-websqldatabase indexeddb hashchange history draganddrop websockets rgba hsla multiplebgs backgroundsize borderimage borderradius boxshadow textshadow opacity cssanimations csscolumns cssgradients no-cssreflections csstransforms csstransforms3d csstransitions fontface generatedcontent video audio localstorage sessionstorage webworkers applicationcache svg inlinesvg smil svgclippaths" lang="id-ID">
<head>
<?php include'header.php';?>
<style>
form {
width: 80vw;
margin: 20px auto;
}
.form-control { color: #495057; ... }
</style>
</head>
<body class="blue-one-page tos-desktop" id="body">
<main class="site-content" role="main">
<div class="section" id="main-konten">
<div class="container">
<div class="row">
<div class="col-md-12" id="header-page">
<h1><span> Alumni JTI </span></h1>
</div>
<div class="col-md-12 left-side">
<div class="artikel">
<div class="konten">
<div class="row">
<div class="col-md-12">
<!--tabel-->
<div class="row">
<div class="col-md-12">
<center>Edit Data Mahasiswa</center><br>
<div class="table-container">
<!--form-->
<center>
<table border="0">
<form action="edit_proses_data_mhs.php" method="POST" name="simpan">
<input type="hidden" name="id" value="<?php echo $id;?>">
<tr>
<td colspan="3"><div class="form-group">
<label for="exampleFormControlInput1">Foto</label><br>
<center><?php echo '<img src="images/'.$hasil['foto'].'">'; ?>
<input type="hidden" name="foto" value="<?php echo $hasil['foto']; ?>" /><br></center>
</div>
</td>
</tr>
<tr>
<td colspan="3"><div class="form-group">
<label for="exampleFormControlInput1">Nama<font color="red">*</font></label>
<input name="nama" class="form-control" id="exampleFormControlInput1" required="" value="<?php echo $hasil['nama'];?>">
</div></td>
</tr>
<tr>
<td><div class="form-group">
<label for="exampleFormControlInput1">NIM<font color="red">*</font></label>
<input name="nim" class="form-control" id="exampleFormControlInput1" required="" value="<?php echo $hasil['nim'];?>">
</div></td>
<td width="10"></td>
<td><div class="form-group">
<label for="exampleFormControlInput1">Pekerjaan</label>
<input name="pekerjaan" class="form-control" id="exampleFormControlInput1" value="<?php echo $hasil['pekerjaan'];?>">
</div>
</td>
</tr>
<tr>
<td><div class="form-group">
<label for="exampleFormControlInput1">Prodi<font color="red">*</font></label><select name="prodi" class="form-control" id="exampleFormControlInput1" required="">
<option value="">-Pilih Prodi-</option>
<option value="Manajemen Informatika" <?php if($hasil['prodi']=='Manajemen Informatika'){echo'selected';}?>>Manajemen Informatika</option>
<option value="Teknik Komputer" <?php if($hasil['prodi']=='Teknik Komputer'){echo'selected';}?>>Teknik Komputer</option>
<option value="Teknik Informatika" <?php if($hasil['prodi']=='Teknik Informatika'){echo'selected';}?>>Teknik Informatika</option>
</select>
</div></td>
<td width="10"></td>
<td><div class="form-group">
<label for="exampleFormControlInput1">Email</label>
<input name="email" class="form-control" id="exampleFormControlInput1" value="<?php echo $hasil['email'];?>">
</div>
</td>
</tr>
<tr>
<td><div class="form-group">
<label for="exampleFormControlInput1">Angkatan<font color="red">*</font></label>
<input name="angkatan" class="form-control" id="exampleFormControlInput1" required="" value="<?php echo $hasil['angkatan'];?>">
</div></td>
<td width="10"></td>
<td><div class="form-group">
<label for="exampleFormControlInput1">Judul TA</label>
<input name="jdl_TA" class="form-control" id="exampleFormControlInput1" value="<?php echo $hasil['jdl_TA'];?>">
</div>
</td>
</tr>
<tr>
<td><div class="form-group">
<label for="exampleFormControlInput1">Tahun Masuk<font color="red">*</font></label>
<input name="th_masuk" class="form-control" id="exampleFormControlInput1" required="" value="<?php echo $hasil['th_masuk'];?>">
</div></td>
<td width="10"></td>
<td><div class="form-group">
<label for="exampleFormControlInput1">Tahun Lulus<font color="red">*</font></label>
<input name="th_lulus" class="form-control" id="exampleFormControlInput1" required="" value="<?php echo $hasil['th_lulus'];?>">
</div>
</td>
</tr>
<tr>
<td><div class="form-group">
<label for="exampleFormControlInput1">Jenis Kelamin<font color="red">*</font></label><br>
<input name="jkel" type="radio" value="L" required="" <?php if($hasil['jkel']=='L'){echo'checked';}?>>Laki-Laki
<input name="jkel" type="radio" value="P" required="" <?php if($hasil['jkel']=='P'){echo'checked';}?>>Perempuan
</div></td>
<td width="10"></td>
<td><div class="form-group">
<label for="exampleFormControlInput1">No. HP/Telp.</label>
<input name="no_telp" class="form-control" id="exampleFormControlInput1" value="<?php echo $hasil['no_telp'];?>">
</div>
</td>
</tr>
<tr><td colspan="3"></td></tr>
<tr><td colspan="3"><button class="btn btn-primary" type="reset">Reset</button> <button class="btn btn-primary" type="submit" name="simpan">Edit</button></td></tr>
</form>
</table></center>
<button class="btn btn-primary" type="submit" onclick="history.back(-1)">Kembali</button>
</div>
</div>
</div>
<!--pagination-->
<center>
<div class="row">
<div class="col-md-12">
<br>
</div>
</div>
</center>
</div>
</div>
</div> <!-- container -->
</div> <!--tutup class .row -->
</div> <!--tutup class .container -->
</div> <!--tutup id #main-konten -->
<?php include'footer.php';?>
</main>
</body>
</html>
<?php
}else{
echo'<script>window.location="login.php"</script>';
}
?>