alert("You file extension must be .png, .pdf, .docx, .jpg, .jpeg");location.href="material.php"'; } elseif ($_FILES['image']['size'] > 100000000) { // file shouldn't be larger than 1Megabyte echo ''; } else { // move the uploaded (temporary) file to the specified destination if (move_uploaded_file($file, $destination)) { $sql = "INSERT INTO `study_material` (`id`, `timestamp`, `description`, `file`) VALUES (NULL, CURRENT_TIMESTAMP, '".$_POST['title']."', '".$filename."')"; if (mysqli_query($con, $sql)) { echo ''; } } else { echo ''; } } } if($_GET['action']=='del') { if(file_exists("../uploads/study_material/".$_GET['file'])) unlink("../uploads/study_material/".$_GET['file']); $con->query("DELETE FROM study_material where id = '".$_GET['id']."'"); echo ''; } ?>

Site Download Manager