<h3>Form Laporan</h3>
<form method="get" action="proseslaporan.php">
<strong>Pilih Jenis Laporan<strong/>
<br />
<select name="tiara">
<option value=jadwalpengiriman name="jadwal_pengiriman" selected>Laporan Jadwal Pengiriman</option>
<option value=datatujuan name="data_tujuan" selected>Laporan Rute Pengiriman</option>
<option value=transaksi name="transaksi" selected>Laporan Transaksi Pengiriman</option>
</select>
</form>
maksudnya dari value itu,saat di klik menampilkan data tabel dari database,oiya untuk "select name" itu untuk nama database atau tabelnya,tolong dijelaskan juga / link referensinya. <h3>Form Laporan</h3>
<form method="get" action="proseslaporan.php">
<strong>Pilih Jenis Laporan<strong/>
<br />
<select name="tiara">
<option value=jadwalpengiriman name="jadwal_pengiriman" selected>Laporan Jadwal Pengiriman</option>
<option value=datatujuan name="data_tujuan" selected>Laporan Rute Pengiriman</option>
<option value=transaksi name="transaksi" selected>Laporan Transaksi Pengiriman</option>
</select>
<input type="submit" value="go"/>
</form>
<?php if(isset($_GET['tiara'])){
$sql = "select * from ".$_GET['tiara'];
$q = mysql_query($sql);
while($data = mysql_fetch_array($q)){
print_r($data);
}
}?>
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in E:\xampp\htdocs\tiara\formlaporan.php on line 37
[*]<form method="post" action="prosesdaftar1.php">
<tr>
<td><input type="hidden" name="id" id="id" /></td>
</tr>
<tr>
<td><strong>Program Keahlian</strong> :
<select name="pilihan_keahlian" size="1">
<option value="1201">Teknik Komputer Jaringan</option>
<option value="1202">Teknik Otomotif</option>
<option value="1203">Tata Busana</option>
</select>
<input type="submit" name="submit" value="Kirim" /><?php if(isset($_GET['pilihan_keahlian'])){
$sql = "select * from keahlian ".$_GET['pilihan_keahlian'];
$q = mysql_query($sql);
while($data = mysql_fetch_array($q)){
print_r($data);
}
}?>