What role does session_start() play in PHP scripts and how does it relate to header redirects?
Session_start() is a PHP function used to start a new session or resume an existing session. It must be called before any output is sent to the browser, including HTML tags or whitespace. When using header redirects in PHP scripts, session_start() should be called at the beginning of the script to ensure that session variables are available for use throughout the script.
<?php
session_start();
// Perform any necessary operations
header("Location: new_page.php");
exit;
?>