Problem : Headers simply not redirecting to the final.php page.
Tried methods :
- there are no header already sent errors.
- Checked the whitespaces in all the files.
- the folder structure is intact.
used full path
header("Location:localhost:81/2php_quizzer/final.php");
but still shows blank page
the $number and $total values are the same.
tried other pages instead of final.php still not working.
if ($number == $total) {
echo $number . "=" . $total; // testing
header("Location : final.php");
// tried using header("Location :localhost:81/2php_quizzer/final.php");
exit();
} else {
// redirect to the next question
header("Location: questions.php?n=" . $next);
}
What worked so far.. the else block is working fine
So, after completing the two questions. The user should be redirected to final.php page containing "test complete " message however the page is still blank and stuck at process.php.