wjlfernando

Active member
  • Aug 13, 2007
    2,423
    0
    38
    any one can fix this code's error

    HTML:
    <html>
    <head>
    
    <title>Course Progession</title>
    <style type="text/css">
    <!--
    .style1 {
    color: #FFFFFF;
    font-weight: bold;
    }
    -->
    </style>
    </head>
    
    <body>
    <?php
    $firstName = @$_POST["Firstname"];
    $surName = @$_POST["Surname"];
    $studentId = @$_POST["StudentID"];
    $courseType = @$_POST["CourseType"];
    
    //dim $unitCode;
    $unitCode = array($_POST["UnitCode_1"], $_POST["UnitCode_2"], $_POST["UnitCode_3"], $_POST["UnitCode_4"], $_POST["UnitCode_5"], $_POST["UnitCode_6"], $_POST["UnitCode_7"], $_POST["UnitCode_8"], $_POST["UnitCode_9"], $_POST["UnitCode_10"], $_POST["UnitCode_11"], $_POST["UnitCode_12"], $_POST["UnitCode_13"], $_POST["UnitCode_14"], $_POST["UnitCode_15"], $_POST["UnitCode_16"], $_POST["UnitCode_17"], $_POST["UnitCode_18"], $_POST["UnitCode_19"], $_POST["UnitCode_20"], $_POST["UnitCode_21"], $_POST["UnitCode_22"], $_POST["UnitCode_23"], $_POST["UnitCode_24"], $_POST["UnitCode_25"], $_POST["UnitCode_26"], $_POST["UnitCode_27"], $_POST["UnitCode_28"], $_POST["UnitCode_29"], $_POST["UnitCode_30"]);
    
    //dim $noOfCreditPoints;
    $noOfCreditPoints = array(@$_POST["CP_1"], $_POST["CP_2"], $_POST["CP_3"], $_POST["CP_4"], $_POST["CP_5"], $_POST["CP_6"], $_POST["CP_7"], $_POST["CP_8"], $_POST["CP_9"], $_POST["CP_10"], $_POST["CP_11"], $_POST["CP_12"], $_POST["CP_13"], $_POST["CP_14"], $_POST["CP_15"], $_POST["CP_16"], $_POST["CP_17"], $_POST["CP_18"], $_POST["CP_19"], $_POST["CP_20"], $_POST["CP_21"], $_POST["CP_22"], $_POST["CP_23"], $_POST["CP_24"], $_POST["CP_25"], $_POST["CP_26"], $_POST["CP_27"], $_POST["CP_28"], $_POST["CP_29"], $_POST["CP_30"]);
    
    //dim $semester;
    $semester = array(@$_POST["YS_1"], $_POST["YS_2"], $_POST["YS_3"], $_POST["YS_4"], $_POST["YS_5"], $_POST["YS_6"], $_POST["YS_7"], $_POST["YS_8"], $_POST["YS_9"], $_POST["YS_10"], $_POST["YS_11"], $_POST["YS_12"], $_POST["YS_13"], $_POST["YS_14"], $_POST["YS_15"], $_POST["YS_16"], $_POST["YS_17"], $_POST["YS_18"], $_POST["YS_19"], $_POST["YS_20"], $_POST["YS_21"], $_POST["YS_22"], $_POST["YS_23"], $_POST["YS_24"], $_POST["YS_25"], $_POST["YS_26"], $_POST["YS_27"], $_POST["YS_28"], $_POST["YS_29"], $_POST["YS_30"]);
    
    //dim $marks;
    $marks = array(@$_POST["UM_1"], $_POST["UM_2"], $_POST["UM_3"], $_POST["UM_4"], $_POST["UM_5"], $_POST["UM_6"], $_POST["UM_7"], $_POST["UM_8"], $_POST["UM_9"], $_POST["UM_10"], $_POST["UM_11"], $_POST["UM_12"], $_POST["UM_13"], $_POST["UM_14"], $_POST["UM_15"], $_POST["UM_16"], $_POST["UM_17"], $_POST["UM_18"], $_POST["UM_19"], $_POST["UM_20"], $_POST["UM_21"], $_POST["UM_22"], $_POST["UM_23"], $_POST["UM_24"], $_POST["UM_25"], $_POST["UM_26"], $_POST["UM_27"], $_POST["UM_28"], $_POST["UM_29"], $_POST["UM_30"]); //Getting the marks
    
    $anyError = false;
    
    $unitsAttempted = 0;
    
    $passedUnits = 0;
    
    $totalCreditPoints = 0;
    
    $totalMarks = 0;
    
    
    
    function validateStudentInfo($fName, $sName, $stdId) {
    
    if($fName == NULL){
    echo "Please enter your Firstname <br />";
    $anyError = true;
    }
    
    if($sName == NULL){
    echo "Please enter your Surname <br />";
    $anyError = true;
    }
    
    if($stdId == NULL){
    echo "Please enter your Student ID <br />";
    $anyError = true;
    }
    
    if($stdId <> NULL){
    //dim $sID;
    $sID = strlen($stdId);
    if(($sID<8) OR (!is_numeric($stdId))){
    echo "Please re-enter the Student ID, Student ID must be a 8 digit numeric <br />";
    $anyError = true;
    }
    }
    }
    
    
    
    function displayStudentDetails ($fName, $sName, $stdId) {
    echo "Name : ".($fName)." ".($sName);
    echo "<br />Student ID : ".($stdId);
    }
    
    
    
    function displayCourseDetails($course) {
    
    if($course == 1){
    echo "<br /><br />You have chosen the Undergraduate Program";
    }
    
    if($course == 2){
    echo "<br /><br />You have chosen the Graduate Diploma Program";
    }
    
    if($course == 3){
    echo "<br /><br />You have chosen the Masters by Coursework Program";
    }
    
    if($course == 4){
    echo "<br /><br />You have chosen the Masters by Research Program";
    }
    
    }
    
    
    
    function validateCourseInfo($uCode, $cPoints, $sem, $mark) {
    for ($counter=0; $counter<=29; $counter++) {
    
    if(($uCode[$counter] <> NULL)AND($cPoints[$counter] <> "")AND($sem[$counter] <> "")AND($mark[$counter] <> ""))then;
    //dim $uC;
    $uC = strlen($uCode[$counter]);
    if($uC <> 7)then;
    echo "<br />Please check row number ".($counter+1);
    echo "<br />Unitcode should consist of 7 digits<br />";
    $anyError = true;
    }
    
    if(is_numeric($cPoints[$counter])){
    if(($cPoints[$counter] <> 20) AND ($cPoints[$counter] <> 15)){
    echo "<br />Please check row number ".($counter+1);
    echo "<br />Credit points only be either 15 or 20<br />";
    $anyError = true;
    }
    } else {
    echo "<br />Please check row number ".($counter+1);
    echo "<br />Credit points only be either 15 or 20<br />";
    $anyError = true;
    }
    
    //dim $smstr;
    $smstr = strlen($sem[$counter]);
    if (($smstr <> 3)OR(! is_numeric($sem[$counter]))){
    echo "<br />Please check row number ".($counter+1);
    echo "<br />Semester must be a 3 digits numeric<br />";
    $anyError = true;
    }
    
    if(is_numeric($mark[$counter])){
    if($mark[$counter] > 100 OR 0 >= $mark[$counter]){
    echo "<br />Please check row number ".($counter+1);
    echo "<br />Marks should be less than 100 or greater than 0<br />";
    $anyError = true;
    }
    } else {
    echo "<br />Please check row number ".($counter+1);
    echo "<br />Marks should be less than 100 or greater than 0<br />";
    $anyError = true;
    }
    
    
    
    
    
    
    function findAndCalculateCourseDetails($cPoints, $mark) {
    
    for ($counter=0; $counter<=29; $counter++) {
    if($mark[$counter]<>NULL){
    if($mark[$counter]<=100 AND $mark[$counter]>=0)then;
    $unitsAttempted = $unitsAttempted+1;
    $totalMarks = $totalMarks + $mark[$counter];
    
    if($mark[$counter]>=50){
    $numberOfPassedUnits = $numberOfPassedUnits+1;
    $totalCreditPoints = $totalCreditPoints+$cPoints[$counter];
    }
    }
    }
    }
    
    echo "<br /><br />You have Total of ".$totalMarks." Marks";
    echo "<br />Your have ".totalCreditPoints." credit points";
    echo "<br /><br />You have attempted ".$unitsAttempted." times";
    echo "<br />You have successlully completed ".numberOfPassedUnits." units";
    
    }
    
    
    
    function calculateRequiredCreditPoints ($totalCreditPoints, $course) {
    
    //dim $pointsRequired;
    if($course == 1){
    $pointsRequired = 360 - $totalCreditPoints;
    }
    
    if($course == 2){
    $pointsRequired = 120 - $totalCreditPoints;
    }
    
    if($course == 3){
    $pointsRequired = 180 - $totalCreditPoints;
    }
    
    if($course == 4){
    $pointsRequired = 240 - $totalCreditPoints;
    }
    
    
    if($pointsRequired > 0){
    echo "<br /><br />You Need Another ".$pointsRequired." marks to complete the selected program";
    
    } else {
    echo "<br /><br />Congratulations!! You have successfully completed the selected program";
    }
    
    }
    
    
    
    function calculateCourseAvg ($totalMarks, $unitsAttempted) {
    if($unitsAttempted>0){
    //dim $average;
    $average = $totalMarks/$unitsAttempted;
    
    
    if($average <50){
    echo "<br /><br />Your Average is ".$average." and Your Grade is F - Fail";
    } elseif($average <60){
    echo "<br /><br />Your Average is ".$average." and Your Grade is C - Simple Pass";
    } elseif($average <70){
    echo "<br /><br />Your Average is ".$average." and Your Grade is Cr - Credit pass";
    } elseif($average <80){
    echo "<br /><br />Your Average is ".$average." and Your Grade is D - Distinction";
    } else {
    echo "<br /><br />Your Average is ".$average." and Your Grade is HD - High Distinction";
    }
    }
    } //
    
    
    validateStudentInfo($firstName, $surName, $studentId);
    
    
    validateCourseInfo($unitCode, $noOfCreditPoints, $semester, $marks);
    
    
    if($anyError == false){
     displayStudentDetails($firstName, $surName, $studentId);
     displayCourseDetails($courseType);
     findAndCalculateCourseDetails($noOfCreditPoints, $marks);
     calculateRequiredCreditPoints (totalCreditPoints, $courseType);
     calculateCourseAvg ($totalMarks, $unitsAttempted);
    }
    ?>
    </body>
    </html>
     

    wjlfernando

    Active member
  • Aug 13, 2007
    2,423
    0
    38
    here HTML page for PHP code

    HTML:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>CPA</title>
    </head>
    
    <body>
    <h1>Course Progession Analyser</h1>
    <hr />
    <table width="509" border="1">
    <form method="post" action="form_p.php">
      <tr>
        <td width="98">Firstname</td>
        <td width="185"><input name="Firstname" type="text" id="Firstname" size="20" maxlength="50" /></td>
        <td width="99"> </td>
        <td width="99"> </td>
      </tr>
      <tr>
        <td>Surname</td>
        <td><input name="Surname" type="text" id="Surname" size="20" maxlength="50" /></td>
        <td> </td>
        <td> </td>
      </tr>
      <tr>
        <td>Student ID </td>
        <td><input name="StudentID" type="text" id="StudentID" size="8" maxlength="8" /></td>
        <td> </td>
        <td> </td>
      </tr>
      <tr>
        <td>Course Type </td>
        <td><select name="CourseType" id="CourseType">
          <option value="1" selected="selected">Undergraduate Degree</option>
          <option value="2">Graduate Diploma</option>
          <option value="3">Masters by Coursework</option>
          <option value="4">Masters by Research</option>
        </select>    </td>
        <td> </td>
        <td> </td>
      </tr>
      <tr>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
      </tr>
      <tr>
        <td><p align="center"><em><strong>Unit Code </strong></em></p></td>
        <td><p align="center"><em><strong>Credit Points </strong></em></p></td>
        <td><p align="center"><em><strong>Year / Semester</strong></em></p></td>
        <td><em><strong>Mark ( / 100) </strong></em></td>
      </tr>
      <tr>
        <td><div align="center">
          <input name="UnitCode_1" type="text" id="UnitCode_1" size="7" maxlength="7" />
        </div></td>
        <td><div align="center">
          <input name="CP_1" type="text" id="CP_1" size="2" maxlength="2" />
        </div></td>
        <td><div align="center">
            <input name="YS_1" type="text" id="YS_1" size="3" maxlength="3" />
        </div></td>
        <td><div align="center">
            <input name="UM_1" type="text" id="UM_1" size="3" maxlength="3" />
        </div></td>
      </tr>
      <tr>
        <td><div align="center">
          <input name="UnitCode_2" type="text" id="UnitCode_2" size="7" maxlength="7" />
        </div></td>
        <td><div align="center">
          <input name="CP_2" type="text" id="CP_2" size="2" maxlength="2" />
        </div></td>
        <td><div align="center">
            <input name="YS_2" type="text" id="YS_2" size="3" maxlength="3" />
        </div></td>
        <td><div align="center">
            <input name="UM_2" type="text" id="UM_2" size="3" maxlength="3" />
        </div></td>
      </tr>
      <tr>
        <td><div align="center">
          <input name="UnitCode_3" type="text" id="UnitCode_3" size="7" maxlength="7" />
        </div></td>
        <td><div align="center">
          <input name="CP_3" type="text" id="CP_3" size="2" maxlength="2" />
        </div></td>
        <td><div align="center">
            <input name="YS_3" type="text" id="YS_3" size="3" maxlength="3" />
        </div></td>
        <td><div align="center">
            <input name="UM_3" type="text" id="UM_3" size="3" maxlength="3" />
        </div></td>
      </tr>
      <tr>
        <td><div align="center">
          <input name="UnitCode_4" type="text" id="UnitCode_4" size="7" maxlength="7" />
        </div></td>
        <td><div align="center">
          <input name="CP_4" type="text" id="CP_4" size="2" maxlength="2" />
        </div></td>
        <td><div align="center">
            <input name="YS_4" type="text" id="YS_4" size="3" maxlength="3" />
        </div></td>
        <td><div align="center">
            <input name="UM_4" type="text" id="UM_4" size="3" maxlength="3" />
        </div></td>
      </tr>
      <tr>
        <td><div align="center">
          <input name="UnitCode_5" type="text" id="UnitCode_5" size="7" maxlength="7" />
        </div></td>
        <td><div align="center">
          <input name="CP_5" type="text" id="CP_5" size="2" maxlength="2" />
        </div></td>
        <td><div align="center">
            <input name="YS_5" type="text" id="YS_5" size="3" maxlength="3" />
        </div></td>
        <td><div align="center">
            <input name="UM_5" type="text" id="UM_5" size="3" maxlength="3" />
        </div></td>
      </tr>
      <tr>
        <td><div align="center">
          <input name="UnitCode_6" type="text" id="UnitCode_6" size="7" maxlength="7" />
        </div></td>
        <td><div align="center">
          <input name="CP_6" type="text" id="CP_6" size="2" maxlength="2" />
        </div></td>
        <td><div align="center">
            <input name="YS_6" type="text" id="YS_6" size="3" maxlength="3" />
        </div></td>
        <td><div align="center">
            <input name="UM_6" type="text" id="UM_6" size="3" maxlength="3" />
        </div></td>
      </tr>
      <tr>
        <td><div align="center">
          <input name="UnitCode_7" type="text" id="UnitCode_7" size="7" maxlength="7" />
        </div></td>
        <td><div align="center">
          <input name="CP_7" type="text" id="CP_7" size="2" maxlength="2" />
        </div></td>
        <td><div align="center">
            <input name="YS_7" type="text" id="YS_7" size="3" maxlength="3" />
        </div></td>
        <td><div align="center">
            <input name="UM_7" type="text" id="UM_7" size="3" maxlength="3" />
        </div></td>
      </tr>
      <tr>
        <td><div align="center">
          <input name="UnitCode_8" type="text" id="UnitCode_8" size="7" maxlength="7" />
        </div></td>
        <td><div align="center">
          <input name="CP_8" type="text" id="CP_8" size="2" maxlength="2" />
        </div></td>
        <td><div align="center">
            <input name="YS_8" type="text" id="YS_8" size="3" maxlength="3" />
        </div></td>
        <td><div align="center">
            <input name="UM_8" type="text" id="UM_8" size="3" maxlength="3" />
        </div></td>
      </tr>
      <tr>
        <td><div align="center">
          <input name="UnitCode_9" type="text" id="UnitCode_9" size="7" maxlength="7" />
        </div></td>
        <td><div align="center">
          <input name="CP_9" type="text" id="CP_9" size="2" maxlength="2" />
        </div></td>
        <td><div align="center">
            <input name="YS_9" type="text" id="YS_9" size="3" maxlength="3" />
        </div></td>
        <td><div align="center">
            <input name="UM_9" type="text" id="UM_9" size="3" maxlength="3" />
        </div></td>
      </tr>
      <tr>
        <td><div align="center">
          <input name="UnitCode_10" type="text" id="UnitCode_10" size="7" maxlength="7" />
        </div></td>
        <td><div align="center">
          <input name="CP_10" type="text" id="CP_10" size="2" maxlength="2" />
        </div></td>
        <td><div align="center">
            <input name="YS_10" type="text" id="YS_10" size="3" maxlength="3" />
        </div></td>
        <td><div align="center">
            <input name="UM_10" type="text" id="UM_10" size="3" maxlength="3" />
        </div></td>
      </tr>
      <tr>
        <td><div align="center">
          <input name="UnitCode_11" type="text" id="UnitCode_11" size="7" maxlength="7" />
        </div></td>
        <td><div align="center">
          <input name="CP_11" type="text" id="CP_11" size="2" maxlength="2" />
        </div></td>
        <td><div align="center">
            <input name="YS_11" type="text" id="YS_11" size="3" maxlength="3" />
        </div></td>
        <td><div align="center">
            <input name="UM_11" type="text" id="UM_11" size="3" maxlength="3" />
        </div></td>
      </tr>
      <tr>
        <td><div align="center">
          <input name="UnitCode_12" type="text" id="UnitCode_12" size="7" maxlength="7" />
        </div></td>
        <td><div align="center">
          <input name="CP_12" type="text" id="CP_12" size="2" maxlength="2" />
        </div></td>
        <td><div align="center">
            <input name="YS_12" type="text" id="YS_12" size="3" maxlength="3" />
        </div></td>
        <td><div align="center">
            <input name="UM_12" type="text" id="UM_12" size="3" maxlength="3" />
        </div></td>
      </tr>
      <tr>
        <td><div align="center">
          <input name="UnitCode_13" type="text" id="UnitCode_13" size="7" maxlength="7" />
        </div></td>
        <td><div align="center">
          <input name="CP_13" type="text" id="CP_13" size="2" maxlength="2" />
        </div></td>
        <td><div align="center">
            <input name="YS_13" type="text" id="YS_13" size="3" maxlength="3" />
        </div></td>
        <td><div align="center">
            <input name="UM_13" type="text" id="UM_13" size="3" maxlength="3" />
        </div></td>
      </tr>
      <tr>
        <td><div align="center">
          <input name="UnitCode_14" type="text" id="UnitCode_14" size="7" maxlength="7" />
        </div></td>
        <td><div align="center">
          <input name="CP_14" type="text" id="CP_14" size="2" maxlength="2" />
        </div></td>
        <td><div align="center">
            <input name="YS_14" type="text" id="YS_14" size="3" maxlength="3" />
        </div></td>
        <td><div align="center">
            <input name="UM_14" type="text" id="UM_14" size="3" maxlength="3" />
        </div></td>
      </tr>
      <tr>
        <td><div align="center">
          <input name="UnitCode_15" type="text" id="UnitCode_15" size="7" maxlength="7" />
        </div></td>
        <td><div align="center">
          <input name="CP_15" type="text" id="CP_15" size="2" maxlength="2" />
        </div></td>
        <td><div align="center">
            <input name="YS_15" type="text" id="YS_15" size="3" maxlength="3" />
        </div></td>
        <td><div align="center">
            <input name="UM_15" type="text" id="UM_15" size="3" maxlength="3" />
        </div></td>
      </tr>
      <tr>
        <td><div align="center">
          <input name="UnitCode_16" type="text" id="UnitCode_16" size="7" maxlength="7" />
        </div></td>
        <td><div align="center">
          <input name="CP_16" type="text" id="CP_16" size="2" maxlength="2" />
        </div></td>
        <td><div align="center">
            <input name="YS_16" type="text" id="YS_16" size="3" maxlength="3" />
        </div></td>
        <td><div align="center">
            <input name="UM_16" type="text" id="UM_16" size="3" maxlength="3" />
        </div></td>
      </tr>
      <tr>
        <td><div align="center">
          <input name="UnitCode_17" type="text" id="UnitCode_17" size="7" maxlength="7" />
        </div></td>
        <td><div align="center">
          <input name="CP_17" type="text" id="CP_17" size="2" maxlength="2" />
        </div></td>
        <td><div align="center">
            <input name="YS_17" type="text" id="YS_17" size="3" maxlength="3" />
        </div></td>
        <td><div align="center">
            <input name="UM_17" type="text" id="UM_17" size="3" maxlength="3" />
        </div></td>
      </tr>
      <tr>
        <td><div align="center">
          <input name="UnitCode_18" type="text" id="UnitCode_18" size="7" maxlength="7" />
        </div></td>
        <td><div align="center">
          <input name="CP_18" type="text" id="CP_18" size="2" maxlength="2" />
        </div></td>
        <td><div align="center">
            <input name="YS_18" type="text" id="YS_18" size="3" maxlength="3" />
        </div></td>
        <td><div align="center">
            <input name="UM_18" type="text" id="UM_18" size="3" maxlength="3" />
        </div></td>
      </tr>
      <tr>
        <td><div align="center">
          <input name="UnitCode_19" type="text" id="UnitCode_19" size="7" maxlength="7" />
        </div></td>
        <td><div align="center">
          <input name="CP_19" type="text" id="CP_19" size="2" maxlength="2" />
        </div></td>
        <td><div align="center">
            <input name="YS_19" type="text" id="YS_19" size="3" maxlength="3" />
        </div></td>
        <td><div align="center">
            <input name="UM_19" type="text" id="UM_19" size="3" maxlength="3" />
        </div></td>
      </tr>
      <tr>
        <td><div align="center">
          <input name="UnitCode_20" type="text" id="UnitCode_20" size="7" maxlength="7" />
        </div></td>
        <td><div align="center">
          <input name="CP_20" type="text" id="CP_20" size="2" maxlength="2" />
        </div></td>
        <td><div align="center">
            <input name="YS_20" type="text" id="YS_20" size="3" maxlength="3" />
        </div></td>
        <td><div align="center">
            <input name="UM_20" type="text" id="UM_20" size="3" maxlength="3" />
        </div></td>
      </tr>
      <tr>
        <td><div align="center">
          <input name="UnitCode_21" type="text" id="UnitCode_21" size="7" maxlength="7" />
        </div></td>
        <td><div align="center">
          <input name="CP_21" type="text" id="CP_21" size="2" maxlength="2" />
        </div></td>
        <td><div align="center">
            <input name="YS_21" type="text" id="YS_21" size="3" maxlength="3" />
        </div></td>
        <td><div align="center">
            <input name="UM_21" type="text" id="UM_21" size="3" maxlength="3" />
        </div></td>
      </tr>
      <tr>
        <td><div align="center">
          <input name="UnitCode_22" type="text" id="UnitCode_22" size="7" maxlength="7" />
        </div></td>
        <td><div align="center">
          <input name="CP_22" type="text" id="CP_22" size="2" maxlength="2" />
        </div></td>
        <td><div align="center">
            <input name="YS_22" type="text" id="YS_22" size="3" maxlength="3" />
        </div></td>
        <td><div align="center">
            <input name="UM_22" type="text" id="UM_22" size="3" maxlength="3" />
        </div></td>
      </tr>
      <tr>
        <td><div align="center">
          <input name="UnitCode_23" type="text" id="UnitCode_23" size="7" maxlength="7" />
        </div></td>
        <td><div align="center">
          <input name="CP_23" type="text" id="CP_23" size="2" maxlength="2" />
        </div></td>
        <td><div align="center">
            <input name="YS_23" type="text" id="YS_23" size="3" maxlength="3" />
        </div></td>
        <td><div align="center">
            <input name="UM_23" type="text" id="UM_23" size="3" maxlength="3" />
        </div></td>
      </tr>
      <tr>
        <td><div align="center">
          <input name="UnitCode_24" type="text" id="UnitCode_24" size="7" maxlength="7" />
        </div></td>
        <td><div align="center">
          <input name="CP_24" type="text" id="CP_24" size="2" maxlength="2" />
        </div></td>
        <td><div align="center">
            <input name="YS_24" type="text" id="YS_24" size="3" maxlength="3" />
        </div></td>
        <td><div align="center">
            <input name="UM_24" type="text" id="UM_24" size="3" maxlength="3" />
        </div></td>
      </tr>
      <tr>
        <td><div align="center">
          <input name="UnitCode_25" type="text" id="UnitCode_25" size="7" maxlength="7" />
        </div></td>
        <td><div align="center">
          <input name="CP_25" type="text" id="CP_25" size="2" maxlength="2" />
        </div></td>
        <td><div align="center">
            <input name="YS_25" type="text" id="YS_25" size="3" maxlength="3" />
        </div></td>
        <td><div align="center">
            <input name="UM_25" type="text" id="UM_25" size="3" maxlength="3" />
        </div></td>
      </tr>
      <tr>
        <td><div align="center">
          <input name="UnitCode_26" type="text" id="UnitCode_26" size="7" maxlength="7" />
        </div></td>
        <td><div align="center">
          <input name="CP_26" type="text" id="CP_26" size="2" maxlength="2" />
        </div></td>
        <td><div align="center">
            <input name="YS_26" type="text" id="YS_26" size="3" maxlength="3" />
        </div></td>
        <td><div align="center">
            <input name="UM_26" type="text" id="UM_26" size="3" maxlength="3" />
        </div></td>
      </tr>
      <tr>
        <td><div align="center">
          <input name="UnitCode_27" type="text" id="UnitCode_27" size="7" maxlength="7" />
        </div></td>
        <td><div align="center">
          <input name="CP_27" type="text" id="CP_27" size="2" maxlength="2" />
        </div></td>
        <td><div align="center">
            <input name="YS_27" type="text" id="YS_27" size="3" maxlength="3" />
        </div></td>
        <td><div align="center">
            <input name="UM_27" type="text" id="UM_27" size="3" maxlength="3" />
        </div></td>
      </tr>
      <tr>
        <td><div align="center">
          <input name="UnitCode_28" type="text" id="UnitCode_28" size="7" maxlength="7" />
        </div></td>
        <td><div align="center">
          <input name="CP_28" type="text" id="CP_28" size="2" maxlength="2" />
        </div></td>
        <td><div align="center">
            <input name="YS_28" type="text" id="YS_28" size="3" maxlength="3" />
        </div></td>
        <td><div align="center">
            <input name="UM_28" type="text" id="UM_28" size="3" maxlength="3" />
        </div></td>
      </tr>
      <tr>
        <td><div align="center">
          <input name="UnitCode_29" type="text" id="UnitCode_29" size="7" maxlength="7" />
        </div></td>
        <td><div align="center">
          <input name="CP_29" type="text" id="CP_29" size="2" maxlength="2" />
        </div></td>
        <td><div align="center">
            <input name="YS_29" type="text" id="YS_29" size="3" maxlength="3" />
        </div></td>
        <td><div align="center">
            <input name="UM_29" type="text" id="UM_29" size="3" maxlength="3" />
        </div></td>
      </tr>
      <tr>
        <td><div align="center">
          <input name="UnitCode_30" type="text" id="UnitCode_30" size="7" maxlength="7" />
        </div></td>
        <td><div align="center">
          <input name="CP_30" type="text" id="CP_30" size="2" maxlength="2" />
        </div></td>
        <td><div align="center">
            <input name="YS_30" type="text" id="YS_30" size="3" maxlength="3" />
        </div></td>
        <td><div align="center">
            <input name="UM_30" type="text" id="UM_30" size="3" maxlength="3" />
        </div></td>
      </tr>
      <tr>
        <td colspan="4"><input type="submit" name="Submit" value="Submit" /> <input name="Reset" type="reset" id="Reset" value="Reset" /></td>
      </tr>
      </form>
    </table>
    
    
    <p> </p>
    </body>
    </html>
     

    wjlfernando

    Active member
  • Aug 13, 2007
    2,423
    0
    38
    error which i getting

    HTML:
    Notice: Use of undefined constant then - assumed 'then' in C:\wamp\www\form_p.php on line 107
    
    Please check row number 1
    Unitcode should consist of 7 digits
    
    Notice: Use of undefined constant then - assumed 'then' in C:\wamp\www\form_p.php on line 110
    
    Please check row number 2
    Unitcode should consist of 7 digits
    
    Notice: Use of undefined constant then - assumed 'then' in C:\wamp\www\form_p.php on line 110
    
    Please check row number 3
    Unitcode should consist of 7 digits
    
    Notice: Use of undefined constant then - assumed 'then' in C:\wamp\www\form_p.php on line 110
    
    Please check row number 4
    Unitcode should consist of 7 digits
    
    Notice: Use of undefined constant then - assumed 'then' in C:\wamp\www\form_p.php on line 110
    
    Please check row number 5
    Unitcode should consist of 7 digits
    
    Notice: Use of undefined constant then - assumed 'then' in C:\wamp\www\form_p.php on line 110
    
    Please check row number 6
    Unitcode should consist of 7 digits
    
    Notice: Use of undefined constant then - assumed 'then' in C:\wamp\www\form_p.php on line 110
    
    Please check row number 7
    Unitcode should consist of 7 digits
    
    Notice: Use of undefined constant then - assumed 'then' in C:\wamp\www\form_p.php on line 110
    
    Please check row number 8
    Unitcode should consist of 7 digits
    
    Notice: Use of undefined constant then - assumed 'then' in C:\wamp\www\form_p.php on line 110
    
    Please check row number 9
    Unitcode should consist of 7 digits
    
    Notice: Use of undefined constant then - assumed 'then' in C:\wamp\www\form_p.php on line 110
    
    Please check row number 10
    Unitcode should consist of 7 digits
    
    Notice: Use of undefined constant then - assumed 'then' in C:\wamp\www\form_p.php on line 110
    
    Please check row number 11
    Unitcode should consist of 7 digits
    
    Notice: Use of undefined constant then - assumed 'then' in C:\wamp\www\form_p.php on line 110
    
    Please check row number 12
    Unitcode should consist of 7 digits
    
    Notice: Use of undefined constant then - assumed 'then' in C:\wamp\www\form_p.php on line 110
    
    Please check row number 13
    Unitcode should consist of 7 digits
    
    Notice: Use of undefined constant then - assumed 'then' in C:\wamp\www\form_p.php on line 110
    
    Please check row number 14
    Unitcode should consist of 7 digits
    
    Notice: Use of undefined constant then - assumed 'then' in C:\wamp\www\form_p.php on line 110
    
    Please check row number 15
    Unitcode should consist of 7 digits
    
    Notice: Use of undefined constant then - assumed 'then' in C:\wamp\www\form_p.php on line 110
    
    Please check row number 16
    Unitcode should consist of 7 digits
    
    Notice: Use of undefined constant then - assumed 'then' in C:\wamp\www\form_p.php on line 110
    
    Please check row number 17
    Unitcode should consist of 7 digits
    
    Notice: Use of undefined constant then - assumed 'then' in C:\wamp\www\form_p.php on line 110
    
    Please check row number 18
    Unitcode should consist of 7 digits
    
    Notice: Use of undefined constant then - assumed 'then' in C:\wamp\www\form_p.php on line 110
    
    Please check row number 19
    Unitcode should consist of 7 digits
    
    Notice: Use of undefined constant then - assumed 'then' in C:\wamp\www\form_p.php on line 110
    
    Please check row number 20
    Unitcode should consist of 7 digits
    
    Notice: Use of undefined constant then - assumed 'then' in C:\wamp\www\form_p.php on line 110
    
    Please check row number 21
    Unitcode should consist of 7 digits
    
    Notice: Use of undefined constant then - assumed 'then' in C:\wamp\www\form_p.php on line 110
    
    Please check row number 22
    Unitcode should consist of 7 digits
    
    Notice: Use of undefined constant then - assumed 'then' in C:\wamp\www\form_p.php on line 110
    
    Please check row number 23
    Unitcode should consist of 7 digits
    
    Notice: Use of undefined constant then - assumed 'then' in C:\wamp\www\form_p.php on line 110
    
    Please check row number 24
    Unitcode should consist of 7 digits
    
    Notice: Use of undefined constant then - assumed 'then' in C:\wamp\www\form_p.php on line 110
    
    Please check row number 25
    Unitcode should consist of 7 digits
    
    Notice: Use of undefined constant then - assumed 'then' in C:\wamp\www\form_p.php on line 110
    
    Please check row number 26
    Unitcode should consist of 7 digits
    
    Notice: Use of undefined constant then - assumed 'then' in C:\wamp\www\form_p.php on line 110
    
    Please check row number 27
    Unitcode should consist of 7 digits
    
    Notice: Use of undefined constant then - assumed 'then' in C:\wamp\www\form_p.php on line 110
    
    Please check row number 28
    Unitcode should consist of 7 digits
    
    Notice: Use of undefined constant then - assumed 'then' in C:\wamp\www\form_p.php on line 110
    
    Please check row number 29
    Unitcode should consist of 7 digits
    
    Notice: Use of undefined constant then - assumed 'then' in C:\wamp\www\form_p.php on line 110
    
    Please check row number 30
    Unitcode should consist of 7 digits
    
    Notice: Undefined offset: 30 in C:\wamp\www\form_p.php on line 116
    
    Please check row number 31
    Credit points only be either 15 or 20
    
    Notice: Undefined offset: 30 in C:\wamp\www\form_p.php on line 129
    
    Please check row number 31
    Semester must be a 3 digits numeric
    
    Notice: Undefined offset: 30 in C:\wamp\www\form_p.php on line 136
    
    Please check row number 31
    Marks should be less than 100 or greater than 0
    
    Notice: Undefined variable: totalMarks in C:\wamp\www\form_p.php on line 169
    
    
    You have Total of Marks
    Notice: Use of undefined constant totalCreditPoints - assumed 'totalCreditPoints' in C:\wamp\www\form_p.php on line 170
    
    Your have totalCreditPoints credit points
    Notice: Undefined variable: unitsAttempted in C:\wamp\www\form_p.php on line 171
    
    
    You have attempted times
    Notice: Use of undefined constant numberOfPassedUnits - assumed 'numberOfPassedUnits' in C:\wamp\www\form_p.php on line 172
    
    You have successlully completed numberOfPassedUnits unitsName : ghdfhfg gfdhf
    Student ID : 22333333
    
    You have chosen the Undergraduate Program
    Notice: Use of undefined constant then - assumed 'then' in C:\wamp\www\form_p.php on line 157
    
    Notice: Undefined variable: unitsAttempted in C:\wamp\www\form_p.php on line 158
    
    Notice: Undefined variable: totalMarks in C:\wamp\www\form_p.php on line 159
    
    Notice: Undefined variable: numberOfPassedUnits in C:\wamp\www\form_p.php on line 162
    
    Notice: Undefined variable: totalCreditPoints in C:\wamp\www\form_p.php on line 163
    
    Notice: Use of undefined constant totalCreditPoints - assumed 'totalCreditPoints' in C:\wamp\www\form_p.php on line 240
    
    
    You Need Another 360 marks to complete the selected program