Form's script can't conect to database

I can’t tell you which DB your PHP code is trying to connect to
and it probably doesn’t succeed, that’s why you have error 500

in one of the posts above I gave you instructions for error 500

Did you do that ? and what did you see as an error after you enabled error reporting?