Is there an easier way to do this:
if($func != "")
{
if($op1="")$path = "modules/". $func ."/index.php";
if($op2="")$path = "modules/". $func ."/index.php?op1=". $op1;
if($op3="")$path = "modules/". $func ."/index.php?op1=". $op1 ."&op2=". $op2;
if($op4="")$path = "modules/". $func ."/index.php?op1=". $op1 ."&op2=". $op2 ."&op3=". $op3;
if($op4!="")$path = "modules/". $func ."/index.php?op1=". $op1 ."&op2=". $op2 ."&op3=". $op3 ."&op4=". $op4;
require "$path";
}else require "modules/". $modDefault ."/index.php";
I have a page with a variable number of options, and i want to pass those options on to another php file that i'm going to require. I wan't the user to only see the index file, so i'm coding this entire site to be driven by a single index.php