<?php
$myfile = fopen("LectureNumber.txt", "r") or die("Unable to open file!");
$number=fread($myfile,filesize("LectureNumber.txt"));
fclose($myfile);
$Lp="uploads/L". $number . ".pdf";
 $targetfolder = $Lp;
 $ok=1;
$file_type=$_FILES['file']['type'];
/* if ($file_type=="application/pdf") {*/
 if(move_uploaded_file($_FILES['file']['tmp_name'], $targetfolder))
 {
 echo "The file ". basename( $_FILES['file']['name']). " is uploaded";
 }
 else {
 echo "Problem uploading file";
 }
/*}
else {
 echo "You may only upload PDF files and you need a valid username and password.<br>";
}*/
?>
