-
Notifications
You must be signed in to change notification settings - Fork 0
/
form-input-data.php
32 lines (29 loc) · 1.06 KB
/
form-input-data.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
<pre>
<!-- nama file: form-input-<?php echo $_SESSION['tblname']; ?>.php -->
<!--sesuaikan teks tercetak tebal; -->
<table width="50%" align="center" border=""1" cellspacing="0" cellpadding="5" >
<tr>
<td align="center">
<form action='proses-<?php echo $_SESSION['tblname']; ?>.php?proses=tambah' method='post'>
<?php
for($i=0;$i<$_SESSION['da'];$i++){
if($_SESSION['data'][$i][1]!='enum'){
echo "<input type='text' name='".$_SESSION['data'][$i][0]."' placeholder='<b>".$_SESSION['data'][$i][0]."</b>'><br /><br />";
}else{
$jd=explode(",",$_SESSION['data'][$i][2]);
echo $_SESSION['data'][$i][0].": <select name='".$_SESSION['data'][$i][0]."'><br />";
for($opt=0;$opt<count($jd);$opt++)
{
echo "\t<option value=".$jd[$opt]."><b>".str_replace("'","",$jd[$opt])."</b></option><br />";
}
echo "</select><br /><br />";
}
}
?>
<input type='submit' value='Simpan'>
<input type='reset' value='Reset'>
</form>
</td>
</tr>
</table>
</pre>