I want that when uploading a pdf or ppt file on the site it becomes available so that the admins of the site can download. I am able to save the file to a folder, however I can not save it to the database, does anyone have any idea how to do this?
Here is the code for uploading and moving to the folder I chose to save:
<div>
<div style="padding-top: 300px;">
<center><form method="post" enctype="multipart/form-data" action="">
<input type="file" name="arquivo" />
<input type="submit" class="btn btn-primary" value="enviar arquivo" name="enviar">
</form></center>
</div>
</div>
<center><p class="text-center text-success" style="font-size: 20px; padding-bottom: 300px;">
<?php
if (isset($_POST['enviar'])) {
move_uploaded_file($_FILES['arquivo']['tmp_name'], 'uploads/'.$_FILES['arquivo']['name']);
echo "Arquivo enviado com sucesso!!";
}
?>
</p></center>