0){ while($row = mysql_fetch_array($sql)){ foreach( $row AS $key => $val ){ $$key = stripslashes( $val ); } // END FOR echo "View Student Program Details Information

 

"; $query="SELECT * FROM reports WHERE (StudentID ='$theStudentID' AND CreditsTOTAL > 0) ORDER BY EndDate DESC LIMIT 1"; // print "$query"; $result=mysql_query($query); $num=mysql_numrows($result); $i=0; while ($i < $num) { $row99=mysql_fetch_array($result); $CC = $row99["CreditsTPGP"]; // print "$CC"; $CO = $row99["CreditsOTHER"]; // print "$CO"; $CT = $row99["CreditsTOTAL"]; $CG = $row99["CreditsGOAL"]; // CODE echo ''; $i++; } // END WHILE INNER LOOP RECORDSET - last report } // END WHILE echo '
STUDENT INFORMATION :
Name : $first_name $last_name
Login : $username
Email : $email_address
Credits Completed (TPGP) : '.$CC.'
Credits Completed (OTHER) : '.$CO.'
Credits Total : '.$CT.'
Credits Goal : '.$CG.'
    School Day Reports Program    
'; } // END IF else { echo "Session Variables Timed Out - Please login again."; } if ($Submit == "Update Therapy") { $sql2 = "UPDATE therapy SET EndDate='$EndDate',description='$Description' WHERE therapyID=" .$TherapyID; mysql_query($sql2); // print ".$sql2"; $FURL = "TPGP_UpdateWeeklyPrograms.php?ID=" .$StudentID; header("Location:" .$FURL); } else { // $PHP_SELF as the form action will cause the script to post to itself if ($iCancel == "Return"){ $CURL = "TPGP_ViewStudentProgram.php?ID=" .$StudentID; header("Location:" .$CURL); } else { $TherapyID = $_GET['ID']; $sql3="SELECT StudentID, EndDate, description FROM therapy WHERE therapyID=" .$TherapyID; $result3 = mysql_query($sql3); $nrows = mysql_num_rows($result3); $row = mysql_fetch_array($result3); echo '
Weekly Program Details
View Student Program Details
End Date (YYYY-MM-DD)
Summary
Details

'; } } // end else - not cancel ?>