I'm trying to redirect back to a form if they haven't provided the acceptable amount of characters.
So my question is.... Why does this code work:
Code: Select all
if(strlen($cvObjective) < $minCvObective){
$charAmount = strlen($cvObjective);
header("Location: buildCV.php?error=2&charAmount=$charAmount&cvObjective=$cvObjective");
break;
}Code: Select all
if(strlen($cvObjective) > $maxCvObective){
$charAmount = strlen($cvObjective);
header("Location: buildCV.php?error=3&charAmount=$charAmount&cvObjective=$cvObjective");
break;
}$minCvObective = 50
The top code redirects but the bottom does not!!! Have I missed something really obvious?
Thanks in advance.