There is an issue with line 12 (a comment showing the line is present). Apparently, there is an unexpected ';' (semi-colon) in that line. Though the only semicolon there is to close that specific line which is always needed before moving to the next line.
 <?php
// creating a master if to see if the submit button was pressed.
if (isset($_POST['signup-submit'])) {
// connecting to the database validation file in the same file.
  require 'dbh.inc.php';
  $username = $POST['username'];
  $email = $POST['email'];
  $password = $POST['password'];
  $repeatPassword = $POST['repeat_password'];
  //error handlers time!!
  if (!filter_var($email,FILTER_VALIDATE_EMAIL && !preg_match("/^[a-zA-Z0-9]*$/",$username)) {
    header("Location: ../signup.php?error=invalidemailusername");  //this is line 12 with the issue
    exit();
  }
  else if (!preg_match("/^[a-zA-Z0-9]*$/",$username)) {
    header("Location: ../signup.php?error=invalidusername&email=".$email);
    exit();
  }
Parse error: syntax error, unexpected ';' in (no file location for privacy)on line 12
 
     
    