im trying to get error codes to generate with JS so that i dont have to use die. Im using the location function to refresh the page then create the alert but it wont display. It goes as follows:
$fields = "You did not complete all the required fields. Please try again.";
You instructed a location change before any outputs. Outputs will always be ignored in this case.
You may use: