PHP后端一直在失败

Hello all thanks in advanced for any help. I am currently working on a backend with user registration and I am getting around to encrypting the passwords of newly registered users and it seems I have broken my registration system in doing so.

**SEE CODESHARE.IO LINK FOR UPDATED CODE BELOW**

Every time I try and register or login as a user I get a http error 500. Let me know if you need to see any more of my code but from what I have tinkered with it seems this is the only file with issues.

UPDATE: I looked in the console and this is what the network tab told me. Not really sure what to make of it. Screenshot after Register button is pressed and form is filled out.

I also updated my code to reflect what InternetOfThings suggested adding the ' ' around my column names. I am uploading my code to Codeshare.io so y'all can see what I'm working with as I update it. here is the link https://codeshare.io/G6p4ON

I noticed that if i remove the

mysqli_real_escape_string

and try and register a new user it will think that I left the First name field empty even when I clearly didn't.

An error 500 can be caused by a number of things

If you are using Google Chrome you can inspect your webpage (ctrl+shift+i), go to the network tab to see for sure what file is throwing the error then click the file name to check what line is causing it.

Let me know what you find