function processComp() { $type = $_POST['type']; switch($type) { case "image": include_once("includes/class.image.php"); $image = new image(); break; case "file": include_once("includes/class.file.php"); $file = new userFile(); break; case "link": break; case "bulk": break; default: //do stuff } header("Location: client_project.php?job=".base64_encode($_POST['jobNumber']) ); }