<?php

$fieldsstdcheck = new WA_MySQLi_RS("fieldsstdcheck",$cmctrfdb,0);

$fieldsstdcheck->setQuery("SELECT * FROM trfstandards WHERE trfstandards.idtrfdetails='$idtrf'");

$fieldsstdcheck->execute();

?>

<?php

$wa_startindex = 0;

while(!$fieldsstdcheck->atEnd()) {

  $wa_startindex = $fieldsstdcheck->Index;

?>



<?php if (($fieldsstdcheck->getColumnVal("idprotectioncategory")=='') || (($fieldsstdcheck->getColumnVal("iddpicategory")==''))) { 

	$alertyes="YES";

	$_SESSION["alertstd"]=$alertyes;

	header("location: standardstep.php?idtrf=$idtrf");

	}

?>

  <?php

  $fieldsstdcheck->moveNext();

}

$fieldsstdcheck->moveFirst(); //return RS to first record

unset($wa_startindex);

unset($wa_repeatcount);

?>