How to upload multiple image using longblob

Are these multiple images for the same tax_payer_id or are there multiple tax payer ids, a different one for each image? If each image is for a different tax payer id, you will need to design a User Interface (UI) that supports selecting the id per image (if you read my reply in one of your previous threads for this assignment, I offered a method that would work for one or more images - image can be uploaded but I cant an upload an image for specific user - #23 by mabismad )

Don’t use addslashes, use a prepared query instead. You should already be using a prepared query, since all external, unknown, dynamic values can contain sql special characters which can break the sql query syntax, which is how sql injection is accomplished. From the php.net documentation -

The addslashes() is sometimes incorrectly used to try to prevent SQL Injection. Instead, database-specific escaping functions and/or prepared statements should be used.

Each has been removed starting with php8.

Lastly, your code needs validation logic and error handling for any statement that can fail. At any step, you must tell the user if anything they did didn’t work and what they can do to correct the problem. For (multiple) file uploads, this is even more important since a user can upload files that exceed the post_max_size setting on the server. In this case, both the $_FILES and $_POST arrays will be empty. Also, any individual file can exceed the upload_max_filesize setting. Your current code will do nothing in these cases, leaving the user wondering what went wrong.