Reputation: 575
I want to create a form in which i have some textfields and a field for a file upload. In the action i upload the file first, and then save the values from the textfields in my database.
For a file upload I need enctype="multipart/form-data" and then it works but the other things does not work. when i take the default enctype the data save works but the file upload failed.
What should I do?
Upvotes: 0
Views: 1008
Reputation: 49919
Any HTML source?
The enctype should also POST the textfields to the server. Make sure you access the file by $_FILES
and the other data by $_POST
.
You do need enctype="multipart/form-data"
.
If theres still something wrong, it's not in your HTML.
Upvotes: 0