reCAPTCHA V2 Not stopping registration

Hello! I am having reCAPTCHA V2 problems. It seems yesterday it was fine and now it is not working. It is inputting the data to my database even without the recaptcha being checked. Here is my code, I hope I can get some help.

// Include the file that configures the DB.
include 'includes/';

if (isset($_POST["username"])) {
        $email = test_input($_POST["email"]);
        if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
                die("Invalid email");
        if (!empty($_POST["username"]) && (!empty($_POST["password"])) && (!empty($_POST["email"]))) {
                $userDAO = new UserDAO($connection);
                if (strlen($_POST['password']) < 5) {
                        die("Passwords must be 5 characters or longer");
                } else {
                        $user = new User($_POST["username"]);
                        $_SESSION['username'] = $_POST['username'];
                        // header("location:reg-success.php");
        } else {
                die("All Fields are required");
function test_input($data)
        $data = trim($data);
        $data = stripslashes($data);
        return $data;

 if(isset($_POST['submit']) && $_POST['submit'] == 'SUBMIT'){
  if(isset($_POST['g-recaptcha-response']) && !empty($_POST['g-recaptcha-response']))
        $secret = 'myKeyGoesHere';
        $verifyResponse = file_get_contents(''.$secret.'&response='.$_POST['g-recaptcha-response']);
        $responseData = json_decode($verifyResponse);
        <div style="color: limegreen;"><b>You have successfully registered!</b></div>
        <?php }
        { die("Verification failed, please try again."); ?>
            <!--<div style="color: red;"><b>Verification failed, please try again.</b></div>-->
        <?php }
   }else{ die("Please complete the captcha"); ?>
    //   <div style="color: red;"><b>Please complete the captacha.</b></div>
   <?php }

<!DOCTYPE html>  
      <link rel="stylesheet" type="text/css" href="main.css">

           <title>New Website</title>
        <script src="" async defer></script>
           <script src=""></script>  
           <link rel="stylesheet" href="" />  
           <script src=""></script>  
           <br /><br />  
           <div class="container" style="width:500px;">  
           <img src="Logo_1_AP.png" alt="Logo" class="center">
                <h3 align="center"><b>Register!</h3>  
                <h3 align="center">Register</h3>  
                <br />  
                         <form action="" method="POST" style="width: 80%;">
                         <label>Enter Username</label> 
                        <input type="text" name="username" class="form-control" /> 
                        <label>Enter Password</label> 
                        <input type="text" name="password" class="form-control" /> 
                        <label>Enter Email</label> 
                        <input type="text" name="email" class="form-control" /> 
                        <div class="g-recaptcha" data-sitekey="My-SiteKey"></div><br><br>
                        <input type="submit" name="submit" value="SUBMIT">