-1

Sorry if its something simple I'm just missing but I'm quite new to PHP and don't understand why I'm getting a syntax error, unexpected token "}" on lines 4, 5 and 6. Here is my code:

if (isset($_POST["submit"])) {
    echo "It works";
}

else {
    header("location: ../signup.php")
}
Hunt
  • 3
  • 3

1 Answers1

-1

Add a ; at the end on heard();

if (isset($_POST["submit"])) {
        echo "It works";
    }
    
    else {
        header("location: ../signup.php");
    }
    ?>