You have issues with your quotes. If you look at the color highlighting of your code now that it's in this forum's [noparse]
...
[/noparse] tags, you see blocks of PHP code that is all in red, indicating the parser thinks it's part of a quoted string. You need to be sure that string literals begun with a single quote are closed with a single quote, and the same for double quotes, while any literal quotes of the same type within the string are escaped with a back-slash. At a quick glance, I see one line where you escaped a closing quote, which means it does not, in fact, close the quote:
<?php echo('Error! The username you specified does not exist\');?> // that back-slash does not belong there