// id required if ($id == "") { header("Location:mainpage.php"); exit; } // if form was submitted if ($_POST['commit'] == "Cancel") { $objLightTest = new LightTest($id); $objLight = new Light($objLightTest->LightId); header("Location:lighttest_list.php?cat=" . $_REQUEST['cat'] . "&light=" . $objLight->Id); exit; } if ($_POST['commit'] == "Delete Light Test") { $objLightTest = new LightTest($id); $objLight = new Light($objLightTest->LightId); $objLightTest->Delete($id); header("Location:lighttest_list.php?cat=" . $_REQUEST['cat'] . "&light=" . $objLight->Id); exit; } $objLightTest = new LightTest($id); $objLight = new Light($objLightTest->LightId); include "includes/pagetemplate.php"; function PageContent() { global $objLightTest; global $objLight; global $id; ?> <div class="layout laymidwidth">