query("INSERT INTO `assignment` (file, description) VALUES ('$fileName', '$description')"); echo ''; exit; } else { echo ''; } } else { echo ''; } } // Delete Assignment if (isset($_GET['action']) && $_GET['action'] == 'delete' && isset($_GET['id'])) { $id = mysqli_real_escape_string($con, $_GET['id']); // Get file name to delete from server $fileQuery = $con->query("SELECT file FROM `assignment` WHERE id = '$id'"); if ($fileQuery && $fileQuery->num_rows) { $fileData = $fileQuery->fetch_assoc(); if (!empty($fileData['file'])) { $filePath = '../uploads/assignment/' . $fileData['file']; if (file_exists($filePath)) { unlink($filePath); } } } $con->query("DELETE FROM `assignment` WHERE id = '$id'"); echo ''; exit; } ?>

Upload Assignment / Downloads

Supported: PDF, Word, PowerPoint, Excel, ZIP (Max: 50MB)

All Downloads / Assignments

query("SELECT * FROM `assignment` ORDER BY id DESC"); $i = 1; if ($get && $get->num_rows): while ($row = $get->fetch_assoc()): ?>
# Date Document Name Description Action
No Files Found

Upload your first file using the form above.

num_rows): ?>
Total Files: num_rows ?>