PHP MYSQL Login/Signup on same page

I have a mysql and php database. I have some things set up for sign up. However, I’m pretty confused at the procedures I have to do to make the signup.php also the signin. I want both of them on the same php because I don’t wanna get rid of that animation. It looks amazing. Help I’m looking for just a straight piece of script for me to copy paste with clear steps at this point bc I’m tired af for troubleshooting 7 hours in a row.

here is the code: