look closer at your code, please:
<span class="login100-form-title p-b-43" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]); ?>" method="post">
it seems as though you may be new to html as well.
action and method attributes belong with the form element not the span element.
also, just use action="#" or leave it blank action="" versus the awful idea of PHP_SELF.
you should recode your form correctly.
you should also read about get and post methods.
your php script should be separated into post and get content:
if server request method = post then check login etc redirect to dashboard else show your form page
do you not understand the problems with your code?
try reading about forms and handling form submissions (posts).
remember to exit after a header redirect.
Best wishes.