// session_start(); include 'TPGP_db.php'; // self post data $iCancel = $_POST['Cancel']; $theSubmitAction = $_POST['Submit']; $theStepId = $_POST['theStepId']; $SubStep = $_POST['SubStep']; $StepOrder = $_POST['StepOrder']; $Description = $_POST['Description']; $SubValue = $_POST['SubValue']; $iCancel = stripslashes($iCancel); $theSubmitAction = $theSubmitAction; $theStepId = stripslashes($theStepId); $SubStep = stripslashes($SubStep); $StepOrder = stripslashes($StepOrder); $Description = stripslashes($Description); $SubValue = stripslashes($SubValue); // echo $PHP_SELF // THIS IS WHERE THE SELF POST FORM GOES // Define post fields into simple variables if ($iCancel == "Cancel"){ header("Location: TPGP_EditSubSteps.php"); } if ($theStepId){ if ($theSubmitAction=="Delete SubStep") { $sql2 = "DELETE FROM sstep WHERE SStepID=" .$theStepId; mysql_query($sql2); header("Location: TPGP_EditSubSteps.php"); } else { header("Location: TPGP_EditSubSteps.php"); } } else { // $PHP_SELF as the form action will cause the script to post to itself $StepID = $_GET['ID']; $sql3="SELECT SStepID, StepOrder,SubStep,Description,SubValue FROM sstep WHERE SStepID=" .$StepID; // BE SURE TO GO BACK AND LOOK FOR ALL THE RELATED UNITS AND DELETE THEM // $result3 = mysql_query($sql3); $nrows = mysql_num_rows($result3); $row = mysql_fetch_array($result3); echo '