<?php
/*
Improved Include - by dark2k1(dark2k1.com)

This function will allow you to include files and pass variables in the url(ex: file.php?var=somevar).
*/

function include_vars($file_name) {
$file_name = explode("?", $file_name);

	$queries = explode("&", $file_name['1']);
	for($x = 0; $x < count($queries); $x++) {
	$query = explode("=", $queries[$x]);
	$_GET[$query['0']] = $query['1'];
	}

extract($_GET);

/*
PowerPortal Specific Code - Only for use with PP1.1b+

	if($file_name['0'] == "modules.php") {
	$PHP_SELF = "modules.php";
	$_SERVER['PHP_SELF'] = "modules.php";
	} elseif($file_name['0'] == "admin.php") {
	$PHP_SELF = "admin.php";
	$_SERVER['PHP_SELF'] = "admin.php";
	}
*/

include($file_name['0']);
}

include_vars("include2.php?cheese=yo");
?>
Name