will PHP header() & exit() securely terminate a script before redirecting?
- by Haroldo
Is the following a secure way of protecting a user only area?
if(!isset($_SESSION['username'])){redirect(SITE_ROOT . 'st_pages/login/');}
using:
function redirect($url)
{
header('Location: ' . $url);
exit('<a href="' . $url . '">Redirecting you to: ' . $url . '</a>');
}