Is it possible with upload a file AND submit text in a single form?
Yes, it's possible. Just make sure you set the form enctype="multipart/form-data"
and that you use type="file"
for file input and regular inputs (type="text"
, etc) for texts.
You'll need to write a code to move uploaded files to a location you want, as well as to add its info to the database.
Yes, it should be possible.
Just ensure that your <form>
has the attributes enctype="multipart/form-data"
and method="post"
By PHP side after submit, you can use $_POST
variables as usual, plus $_FILES
for handling uploads with <input type="file">
in the same form.
See this PHP manual page for details on file upload.