Skip to content

Glossary: PHP Basics

header()

Also written: header, Location header

A function that adds an HTTP header to the response, such as `header('Location: /thanks.php');` for a redirect. It must run before any output.

Where the book teaches it

Related terms

redirectexit