Thursday, April 16, 2009

Dropdown Data from Table ( PHP script)

()

Sintax :

select.....
php quote

if ($edit==1)
{
$perintah="SELECT * from tm_jabatan where kd_jabatan='$kd_jabatan';
$hasil=mysql_query($perintah);
while ($row=mysql_fetch_array($hasil))
{
$kd_jabatan=$row["kd_jabatan"];
$nm_jabatan=$row["nm_jabatan"];
echo("");
}
}

$perintah="SELECT * from tm_jabatan where stat_jab='1' order by kd_jabatan";
$hasil=mysql_query($perintah);
while ($row=mysql_fetch_array($hasil))
{
$kd_jabatan=$row["kd_jabatan"];
$nm_jabatan=$row["nm_jabatan"];
echo("");
}

php quote

end select

No comments: