Skip to content
Advertisement

Trying to upload multiple files with text box but, on submission, the form the name, date text has no value

This code allows me to save the file correctly and also saves the name to database, but the textbox (Name, date) value is empty despite it having an inputted value.

Here are the PHP and HTML Files with JavaScript.

index.html

JavaScript

This is the PHP insert query.

JavaScript

Advertisement

Answer

You never add the form values to the data being sent to the server, only the files:

JavaScript

Just add the values with it:

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement