<?php
if($tbFN==''){
		$sql = "INSERT INTO ". $GLOBALS['prefix']->table('find_defects') . " (tbReportNumber,tbDefection,tbSerial_NO,tbCritical,tbMajor,tbMinor,tbCategory,tbTopical) VALUES ('$rep','$tbDefection','$tbSerial_NO','$tbCritical','$tbMajor','$tbMinor','$tbCategory','$tbTopical')";
		}
else
		{
		$sql = "UPDATE ". $GLOBALS['prefix']->table('find_defects'). " SET" . " 
tbReportNumber='$rep',tbDefection='$tbDefection',tbSerial_NO='$tbSerial_NO',tbCritical='$tbCritical',tbMajor='$tbMajor',tbMinor='$tbMinor',tbCategory='$tbCategory',tbTopical='$tbTopical' WHERE tbFN='$tbFN'";
		}
?>