1. Home
  2. Computer Science MCQs
  3. PHP
  4. Which function is used to redirect a user to a different…

Added 20 Jan 2024

Which function is used to redirect a user to a different page in PHP?

  1. redirect()
  2. location()
  3. header() Correct answer
  4. relocate()

Correct answer

C. header()

14 views

MCQSEXAM

Explanation

The header() function is used to send raw HTTP headers, including redirects.

Reference

Asked in: PHP Certification

https://www.php.net/manual/en/function.header.php

Preparing for an exam?

Doubts & discussion

Not sure why the answer is C? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More PHP MCQs

Practise all PHP MCQs

Similar MCQs