Validation and upload

Hi, I’ve already posted a topic like this and I’ve thought the problem was solved.
Unfortunately the page:
https://www.campaniaturismo.org/admin/admin-foto-add-new.php
doesnt run I 'm going crezy.
This is a console screenshot.


I 've added server side validation (do not exist in database) and several client side validation roles.
Please can anybody help me.
What does the message from console mean?
Thank you

You can find answer in this page

Thank you for your help. Anyway I’ve already done all of this but the page does not run properly. The browser 's console shows a 500 internal server error. The question is why

Well there is something wrong with either your action file setup or with your database table config:

"SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`campaniaturism`.`tbl_foto`, CONSTRAINT `relazione_foto_luoghi` FOREIGN KEY (`idfoto`) REFERENCES `tbl_relazioni_foto_luoghi` (`idrelazione_foto_luoghi`) ON DELETE CASCADE)"

What exactly are you doing there in your action file - check how you setup your table also?

It seems to me you are referencing some foreign key which does not exist in the table you are trying to access in some of the server action steps…

Thank you Teodor. There was a problem with relationship in mysql. Just last question:
where did you find the string you post before?

These errors can easily be discovered as explained here: Debugging Problems

Thank you Teodor. That’s very kind of you