Exemple #1
0
$query = "SELECT grade_id, course, grade, credit, semester FROM GRADES WHERE user_id={$USERID} ORDER BY grade_id DESC";
$result = query($query);
$i = 1;
while ($row = mysqli_fetch_array($result)) {
    ?>
              <tr>
                <th scope="row"><?php 
    echo $i++;
    ?>
</th>
                <td><?php 
    echo $row['course'];
    ?>
</td>
                <td><?php 
    echo DecodeGrade($row['grade']);
    ?>
</td>
                <td><?php 
    echo $row['credit'];
    ?>
</td>
                <td><?php 
    echo DecodeSemester($row['semester']);
    ?>
</td>
                <td>
                  <form action="/grade/edit/?id=<?php 
    echo $row['grade_id'];
    ?>
" method= "post" id="delete_course">
Exemple #2
0
    $i = 1;
    $query = "SELECT * FROM GRADES WHERE semester={$sem} AND user_id={$USERID}";
    $out = query($query);
    while ($course = mysqli_fetch_array($out)) {
        ?>
            <tr>
              <th scope="row"><?php 
        echo $i++;
        ?>
</th>
              <td><?php 
        echo $course['COURSE'];
        ?>
</td>
              <td><?php 
        echo DecodeGrade($course['GRADE']);
        ?>
</td>
              <td><?php 
        echo $course['GRADE'];
        ?>
</td>
              <td><?php 
        echo $course['CREDIT'];
        ?>
</td>
            </tr>
<?php 
    }
    ?>
          </tbody>