if ($bbo == '') { $nSign = new EBPLSSign($dbLink, 'false'); $nSign->searchcomp1($iName); $rResult = $nSign->rcount; if ($rResult > 0) { ?> <body onload='javascript:alert ("Existing Record Found!!"); _FRM.iName.focus();'></body> <?php } else { $datetoday = date("Y-m-d H:i:s"); $nSign = new EBPLSSign($dbLink, 'false'); $nSign->setData(SIGN_ID, ''); $nSign->setData(GS_NAME, $iName); $nSign->setData(GS_POS, $iPosition); $nSign->setData(GS_OFFICE, $iOffice); $nSign->add(); $iName = ""; $iPosition = ""; $iOffice = ""; ?> <body onload='javascript:alert ("Record Successfully Added to the database!!"); _FRM.iName.focus();'></body> <?php } } else { $nSign = new EBPLSSign($dbLink, 'false'); $nSign->searchcomp($bbo, $iName); $rResult = $nSign->rcount; if ($rResult[0] > 0) { ?> <body onload='javascript:alert ("Existing Record Found!! _FRM.iName.focus();");'></body> <?php