<body onload='javascript:alert ("Record Successfully Updated!!");'></body> <?php } } } elseif ($confx == 1) { $check1 = mysql_query("select * from ebpls_owner where owner_district_code = '{$bbo}'"); $check1 = mysql_num_rows($check1); $check2 = mysql_query("select * from ebpls_business_enterprise where business_district_code = '{$bbo}'"); $check2 = mysql_num_rows($check2); if ($check1 > 0 || $check2 > 0) { ?> <body onload='javascript:alert ("Cannot Delete. Record exist in other table(s).");'></body> <?php } else { $nDistrict = new EBPLSDistrict($dbLink, 'false'); $nDistrict->delete($bbo); $bbo = ""; ?> <body onload='javascript:alert ("Record Deleted!!");'></body> <?php } } if ($com == "edit") { $nDistrict = new EBPLSDistrict($dbLink, 'false'); $nDistrict->search($bbo, NULL); $nResult = $nDistrict->out; $iDistrict = $nResult[district_desc]; $iBLGFCode = $nResult[blgf_code]; $nLGU = new EBPLSLGU($dbLink, 'false'); $nLGU->search($nResult[upper], NULL); $iResult = $nLGU->out;