Return to Snippet

Revision: 18297
at September 27, 2009 18:58 by daveismyname


Initial Code
function redirect($location) {
if ($location !=NULL) {
			header("Location: {$location}");
			exit;
			
		} // End of above if statment.
			
	} // End of function.
	
//usage example
$location = 'sample.php';
redirect($location);

Initial URL


Initial Description
very useful function that allows you to redirect to the user to a given location

Initial Title
Redirect page with a simple function

Initial Tags
function

Initial Language
PHP