I have a form generated via PHP with input text fields, an input file field, and a submit button. The input text fields are validated via JQUERY attached to the submit button.
I can validate the input text via the JQUERY OR I can process the input field on post with the $_FILES
array and move_uploaded_file
function. However I cannot do both at once because if I specify an action for the posted form the JQUERY does not get executed.
I have also tried processing the input file in a second PHP script fired from the JQUERY via ajax. However, the $_FILES array no longer has the data.
I’ve searched high and low and tried several possibilities offered in stackoverflow and elsewhere. I can’t find a solution that works even though this cannot be an unusual situation.