Which function is used to redirect a user to a different page in PHP?
-
A
redirect()
-
B
location()
-
C
header()
Correct answer
-
D
relocate()
Correct answer
C. header()
14 views
Explanation
The header() function is used to send raw HTTP headers, including redirects.
Doubts & discussion
Not sure why the answer is C? Ask here and get an explanation.
Ask a doubt about this MCQ