Reputation: 1171
I have 3 fields in mysql called colour1, colour2, colour3 with either a 'red' or 'blue' value. When attendance1 2 & 3 are submitted it saves in mysql then redirects to submitted1.html.
however if value for each field is 'no' I want it to redirect to submitted2.
Upvotes: 0
Views: 111
Reputation: 4097
just add this above the last header
if($_POST['attendance1'] == 'no' && $_POST['attendance2'] == 'no' && $_POST['attendance3'] == 'no'){
header("Location: otherpage.html");
exit();
}
Upvotes: 1