vendredi 3 mai 2019

How to send file to $_FILE through html form?

Well pretty simple question.. But can't get it right for some reason.

What would be the html code to send a file to this?

move_uploaded_file($FILES["upload"]["tmpname"], $_POST["name"]);

Here's mine but when I used it and echo/vardump everything, I only have 'name' and not the file

<form action="/uploader.php" method="post" enctype="multipart/form-data">
<p>MyUploadPage:
<input type="file" name="upload" />
<input type="name" name"tmp"/>
<input type="submit" value="Send" />
</p>
</form>

Thank you




Aucun commentaire:

Enregistrer un commentaire