Master saya mau tanya data dari database tidak mau muncul di combo box di form edit. berikut saya lampirkan codingan saya terima kasih.
<?php
include "koneksi.php";
$edit = mysql_query("SELECT * FROM company_general WHERE company_id='$_GET[id]'");
$data = mysql_fetch_array($edit);
$tampil=("SELECT from company_general");
$query_hasil=mysql_query($tampil);
$r=mysql_fetch_array($query_hasil);
echo "<h2 align=left>Company General</h2>
<fieldset style='width: 20%'; margin: left;>
<table width=340 border=0 align=left>
<form name=company method=post action=update_companygeneral.php>
<input type=hidden name=id value='$data[company_id]'>
<tr>
<td width=110>Company Id</td>
<td width=10>:</td>
<td width=240>
<select name='company_id'>
<option value=$r[company_id]>$r[company_id]</option>
</select>
</td>
</tr>
<tr>
<td width=110>Name</td>
<td width=10>:</td>
<td width=240>
<input type='text' name='name' value='$data[name]' </td>
</tr>
<tr>
<td width=110>Currency Code</td>
<td width=10>:</td>
<td width=240>
<input type='text' name='currency_code' value='$data[currency_code]' </td>
</tr>
<tr>
<td>Expire Date </td>
<td>:</td>
<td><input type='text' name='expire_date' required /><a href=javascript:void(0) onClick=if(self.gfPop)gfPop.fPopCalendar(document.company.expire_date);return false; ><img name=popcal align=absmiddle style=border:none src='./calender/calender.jpeg' width=34 height=29 border=0 alt=''></a></td>
<tr>
<td colspan=3><div align=left>
<input type=submit name=save value=Save />
<input type=reset name=reset value=Reset />
</div></td>
</tr>
</form>
</table>
</fieldset>
";
?>
<!-- PopCalendar(tag name and id must match) Tags should not be enclosed in tags other than the html body tag. -->
<iframe width=174 height=189 name="gToday:normal:./calender/agenda.js" id="gToday:normal:./calender/agenda.js" src="./calender/ipopeng.htm" scrolling="no" frameborder="0" style="visibility:visible; z-index:999; position:absolute; top:-500px; left:-500px;">
</iframe>