PHP skipping if blocks
<p>When I run this page, everything shows up correctly, but then when I try to test my various error messages, my button keeps redirecting me back to my login page as if everything was inputted correctly. It fails to register the if blocks I've included.  Below is the php (the html runs fine, not included).</p>

<p>*Side note, a few lines are commented out because I initially had PDO and am changing them over to mysql, but those shouldn't affect everything else running.  I have them commented out too so if things did work, I wasn't adding unnecessary info to my database.</p>