set_projects($projects_folder); # delete file and remove project if temporary-project.txt is still here # unless "Delete" has been clicked (which will do the same job + throw a notice) # and unless "Edit" has been clicked (which continue editing the same temporary project) if ($_POST['Submit'] != 'delete_project' && $_POST['Submit'] != 'edit_project') { $tempFilename = strval(Project::$amount).'-temporary-filename.txt'; if ($projects->{$tempFilename}) { $projects->{$tempFilename}->delete_file($projects_folder); $projects->remove_project($projects->{$tempFilename}); } } # start the HTML form echo '
'."\n"; require 'views/footer.php';