Redirect page with a simple function
very useful function that allows you to redirect to the user to a given location
Copy this code and paste it in your HTML
function redirect($location) {
if ($location !=NULL) {
header("Location: {$location}");
} // End of above if statment.
} // End of function.
//usage example
$location = 'sample.php';
redirect($location);
Report this snippet
Comments
Subscribe to comments