On these two lines:
echo $error. "<br>" }
echo '<div class="error_msg_cont">'. $_SESSION["msg"] .'<div>' }
You need a semicolon before the closing }
.
Closing a PHP code block (?>) implies a semicolon, but closing a block of code within a PHP code block (}
) does not.