diff --git a/Course.php b/Course.php index e015043..c63fb41 100644 --- a/Course.php +++ b/Course.php @@ -182,50 +182,50 @@ include 'Header.php';
'; } else { while($row = mysqli_fetch_assoc($result)) { - $title=$row['Title']; - $marks=$row['Marks']; - $ins=$row['Instructions']; - $posted=$row['Posted_Date']; - $deadline=$row['Deadline']; - $att1=$row['Attachment_link_1']; - $att2=$row['Attachment_link_2']; - $att3=$row['Attachment_link_3']; - $att4=$row['Attachment_link_4']; - $id=$row['Lab_Report_ID']; + $title = $row['Title']; + $marks = $row['Marks']; + $ins = $row['Instructions']; + $posted = $row['Posted_Date']; + $deadline = $row['Deadline']; + $att1 = $row['Attachment_link_1']; + $att2 = $row['Attachment_link_2']; + $att3 = $row['Attachment_link_3']; + $att4 = $row['Attachment_link_4']; + $id = $row['Lab_Report_ID']; - $full_link="$att1"; + $full_link = "None"; - if($att2!=""){ - $full_link= $full_link."| $att2"; - } - if($att3!=""){ - $full_link= $full_link."| $att3"; + if ($att1 != "") { + $full_link = "$att1"; } - if($att4!=""){ - $full_link= $full_link."| $att4"; + if($att2 != "") { + $full_link = $full_link."| $att2"; } + if($att3 != "") { + $full_link = $full_link."| $att3"; + } + + if($att4 != "") { + $full_link = $full_link."| $att4"; + } + + echo "$ins
Posted: $posted Deadline: $deadline
Attachments: $full_link