I am creating a browser RPG game where the player registers first and race and then is redirected to a page where he chooses the class. When clicking on the submit button, the breed and race statuses are saved in the DB and the player should be redirected then the problem is that when I click on register the race, the page refreshes but the user data is not sent to BD, only when I press F5 is that the data is sent and I'm redirected to the next page. Does anyone know why this happens?
if ($numPers == 1) {
header("location:cadastrarclasse.php");
}elseif($numPers > 1){
header("location:taverna.php");
}
else{
This code is above the head. The else is in case the user has not yet registered anything, so he stays on the race register page.