Monday, May 9, 2016

WDP - PHP File Upload

PHP File Upload


EXPLAIN


With PHP, it is easy to upload files to the server. Usually use to upload images.

However, with ease comes danger, so always be careful when allowing file uploads!



SAMPLE CODE & OUTPUT

<!DOCTYPE html>
<html>
<body>

<form action="upload.php" method="post" enctype="multipart/form-data">
    Select image to upload:
    <input type="file" name="fileToUpload" id="fileToUpload">
    <input type="submit" value="Upload Image" name="submit">
</form>

</body>
</html>


Reference:

No comments:

Post a Comment