0
I want it to be available when uploading a pdf or ppt file on the site so that the admins of the site can download. I’m managing to save the file in a folder, but I can’t save in the database, does anyone have any idea how to do this?
Here is the code to upload and switch 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>
@Stormwind As far as I know, both syntaxes are equivalent. one is the SQL standard, the other is the Mysql extension.
– Rafael Augusto
https://dev.mysql.com/doc/refman/5.6/en/insert.html
– Rafael Augusto