What are the potential issues with using header() vs include() to load a new page after clicking a link in PHP?

Using header() to load a new page after clicking a link in PHP can cause potential issues such as headers already sent errors if there is any output before the header() function is called. To avoid this issue, it is recommended to use include() to load the new page instead, as it does not rely on modifying headers.

<?php
// Instead of using header() to load a new page, use include() to include the desired content in the current page.

// Example:
if(isset($_GET['page'])) {
    $page = $_GET['page'];
    include($page . '.php');
}
?>