示例#1
0
            //echo "DBAccess::updateUser(" . $targetUserID. ", " .$userName. ", " .null . ", " . $lastName . ", " . $firstName . ", " . $email . ", " . $activated . ", " . $position . " );";
            //die();
            header("Location: ./userDetails.php?userID=" . $targetUserID);
        } else {
            //echo 'An error has been detected in your input';
        }
    } else {
        header("Location: ./index.php?e7");
    }
}
/**************************************************************************
 *
 * Pre form data
 *
 **************************************************************************/
$positionResults = DBAccess::getAllPositions();
$rows = count($positionResults, 0);
$innerHTML = "";
$innerHTML .= "<option value=\"-1\">Select a position</option>";
for ($i = 0; $i < $rows; $i++) {
    $innerHTML .= "<option";
    if ($positionResults[$i]['PositionID'] == $position) {
        $innerHTML .= " selected=\"selected\" ";
    }
    $innerHTML .= " value=\"" . $positionResults[$i]['PositionID'] . "\">" . $positionResults[$i]['PositionName'] . "</option>";
}
/**************************************************************************
 *
 * Actual Form
 *
 **************************************************************************/