Programming
By: nurulaini • Study Guide • 339 Words • May 6, 2011 • 979 Views
Programming
<script language="javaScript">
function popup(page)
{ windowprops = "height=100% width=100%,location=no,"
+ "scrollbars=yes,menubar=no,toolbar=no,resizable=yes";
window.open(page, "Popup", windowprops);
}
function Tentusahkan(frm)
{
if (frm.txt_hubungan1.value == "")
{alert("Sila pilih hubungan peserta!");
frm.txt_kelulusan1.focus();
return 0;
}
return 1;
}
</script>
<script type="text/javascript" src="../script/texteditor/scripts/widgEditor.js"></script>
<style type="text/css">
@import "../script/texteditor/css/widgEditor.css";
</style>
<?php
$hubungan1 = array ('Bapa','Ibu','Abang','Kakak','Adik');
$gelaran1 = array ('Cik','Puan','Encik');
$nokpb = $_GET['nokpb'];
if ($nokpb != "") {
$sql = "SELECT nokpb, hubungan1, gelaran1, nama1, tempat_lahir1, pendidikan_tertinggi1, pekerjaan1, tempat_kerja1, hubungan2, gelaran2, nama2, tempat_lahir2, pendidikan_tertinggi2, pekerjaan2, tempat_kerja2 FROM keluarga WHERE nokpb = '".$nokpb."'";
$result = mysql_query($sql);
while($row = mysql_fetch_array($result)){
$nokpb = $row['nokpb'];
$hubunganKel1 = strtoupper($row['hubungan1']);
$gelaranKel1 = $row['gelaran1'];
$nama1 = $row['nama1'];
$tempat_lahir1 = $row['tempat_lahir1'];
$pendidikan_tertinggi1 = $row['pendidikan_tertinggi1'];
$pekerjaan1 = $row['pekerjaan1'];
$tempat_kerja1 = $row['tempat_kerja1'];
$hubunganKel2 = strtoupper($row['hubungan1']);
$gelaranKel2 = $row['gelaran1'];
$nama2 = $row['nama2'];
$tempat_lahir2 = $row['tempat_lahir2'];
$pendidikan_tertinggi2 = $row['pendidikan_tertinggi2'];
$pekerjaan2 = $row['pekerjaan2'];
$tempat_kerja2 = $row['tempat_kerja2'];
$p = 'update';
}
}
else{
$nokpb = "";
$hubunganKel1 = "";
$gelaranKel1 = "";
$nama1 = "";
$tempat_lahir1 = "";
$pendidikan_tertinggi1 = "";
$tempat_lahir1 = "";
$tempat_kerja1 = "";
$hubunganKel2 = "";
$gelaranKel2 = "";
$nama2 = "";
$tempat_lahir2 = "";
$pendidikan_tertinggi2 = "";
$tempat_lahir2