data not being sent accross website pages. not storing in datyabase

I have the following three files in my website, it does not seem like they are communicating with each other and thus the information is not stored in my database.. can somebody please just point me in the right direction here?

<https://pastebin.com/PZ2ihdRQ>
<https://pastebin.com/LA9Cz7qa>
<https://pastebin.com/CWHvQZzx>

I have tried a few approaches. and I am not sure how to use prepared statements or where to get proper examples for that.

thank you