Website feature breaks after installing cloudflare ssl

We recently added Cloudflare SSL to one of our websites, and after installing the ssl the form on our website breaks after user hits submit.

#CommunityTip

Have you checked your server logs for details on what was occurring at the origin server during the time of the failures?

Is the issue still occurring?

Yes, the issue still persists.
I checked the error logs and this is what I found
[10-Feb-2023 05:27:10 UTC] PHP Notice: Undefined index: submit_contact in /home/mlf1w824ey6n/public_html/webisdom.com/footer.php on line 2
[10-Feb-2023 05:27:10 UTC] PHP Notice: Undefined variable: msg in /home/mlf1w824ey6n/public_html/webisdom.com/footer.php on line 178

Ray ID: 799c3eb1df0df3e9

This issue hasn’t been resolved yet, please provide any solution if you have.