$res=GetResultset("select CaseID,fID from ICARR_Subjects_Form_Questions_Failed");

if(!$trow = mysql_fetch_assoc($res)) 
    echo "<center><h3>No edit failures to review</h3><br>";
else
{
    $_SESSION[`DE_MODE`]="E";

    do
     {
	   echo "Processing Subject: ", $trow[`CaseID`], " Form: " , $trow[`fID`], "...<br>
";
	   $_SESSION[`CaseId`]=$trow[`CaseID`];
	   $_SESSION["Instance"]=$trow[`rInstance`];
	   $frm=$trow[`fID`];
	   SaveGo($frm);
     }
    while ($trow = mysql_fetch_assoc($res));

    $_SESSION[`DE_MODE`]="O";
}
echo "<h2>Batch Editing Completed</h2></center>";

$_SESSION[`CaseId`]=`-1`;
$stat=1;