basically i have this form that allows user to upload to my server:
<form id = "uploadbanner" method = "post" action = "#"> <input id = "fileupload" type = "file" /> <input type = "submit" value = "submit" id = "submit" /> </form>
But the problem is that when i upload a file, then click submit, i don't see the file upload in the server directory.
HTML allows you to add the file upload functionality to your website by adding a file upload button to your webpage with the help of the <input> tag. The <input type=”file”> defines a file-select field and a “Browse“ button for file uploads.
Right-click the folder and select “Upload other file here. . .“. Browse the server for the file you want to upload. Select the file and click Open. Now, you will see the file in the folder location on the server.
Right-click in the attachment pool, and choose Add from the menu that appears. In the Add Attachment dialog box, navigate to the appropriate location and open the file.
<form id="uploadbanner" enctype="multipart/form-data" method="post" action="#"> <input id="fileupload" name="myfile" type="file" /> <input type="submit" value="submit" id="submit" /> </form>
To upload a file, it is essential to set enctype="multipart/form-data"
on your form
You need that form type and then some php to process the file :)
You should probably check out Uploadify if you want something very customisable out of the box.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With