document.location.href = 'login.html'; "; exit; } $rs = DBUSER::train_chals($userid, $errstr); DBGOUT("[errstr] ".$errstr); if ($errstr != "@error.no") { // exit; } else { $dbtable = array(); foreach ($rs as $row) { $dbtable[] = $row; //DBGOUT(json_encode($row)); } DBGOUT(json_encode($dbtable)); } ?>