Skip to content
Advertisement

My php Form doesn’t add messages to PhpMyAdmin

So I’ve updated the code below but it still doesn’t work and I don’t understand why… The messages doesn’t appear in my database in PhpMyAdmin and I don’t see the error messages I’ve put when for example a entry in my form is empty.. Thank you in advance for helping me…………………………………………………………………………………………………………………………………………………………………..

JavaScript

Advertisement

Answer

The name attributes are missing in your form – so nothing gests postet.

It should be:

**UPDATED 4.1.2020 19:03 CET textarea was wrong, sujet vs subject! **

JavaScript

Additionally this is wrong

setting a variable first then asking for its content is not very useful 😉 additionally this variable IS NOT SET ANYWHERE ELSE?!?

JavaScript

so it should be you have to assign a value to succes – for example if you want to check the insert:

JavaScript

I also think that the last if condition is wrong and should be like this:
It cannot be EMPTY AND larger than 500 chars 😉 and the [‘message’] was missing in the first condition

JavaScript

############################################################################### FINAL UPATE: here is the complete fixed code with some debug additions

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