Which of the following code snippets will you use to redirect your users from one page to another?
header("Location: http://php.com");
Correct:
header("Location: http://php.com");
Explanation: Answer option A is correct.
A programmer can redirect users from an opened page to another page by using headers. To do this, he needs to use the Location header:
header("Location: http://php.com");
The programmer can use the exit() function to ensure that portions of the script are not called unexpectedly:
header("Location: http://php.com");
exit();
Answer options B, C, and D are incorrect. These are not valid syntaxes of header redirect.