Exemplo n.º 1
0
         } elseif (isset($_POST['expEdit'])) {
             //Resume Updated correctly now move to the Experience Section
             $_SESSION['location'] = $_SERVER['PHP_SELF'] . "?" . $_SERVER["QUERY_STRING"];
             header('Location: experience.php?mode=Add&resumeID=' . urlencode($resumeID) . '&userID=' . urlencode($resumeUserID));
             //header('Location: main.php');
         } else {
             //Resume Updated now move to the main page.
             $_SERVER['PHP_SELF'];
             header('Location: ./main.php');
         }
         //exit;
     }
 } else {
     // Create
     $userCreateSQL = "create";
     $success = updateInformation($userCreateSQL, $conn);
     if ($success == 1) {
         // Successful Update return to the user information page
         //$conn->close();
         if (isset($_POST['skillEdit'])) {
             //Resume Updated correctly now move to the Skill Section
             $_SESSION['location'] = $_SERVER['PHP_SELF'] . '?mode=Update&resumeID=' . urlencode($resumeID) . '&resumeUserID=' . urlencode($resumeUserID);
             header('Location: skill.php?mode=Resume&resumeID=' . urlencode($resumeID) . '&userID=' . urlencode($resumeUserID));
         } elseif (isset($_POST['expEdit'])) {
             //Resume Updated correctly now move to the Experience Section
             $_SESSION['location'] = $_SERVER['PHP_SELF'] . '?mode=Update&resumeID=' . urlencode($resumeID) . '&resumeUserID=' . urlencode($resumeUserID);
             header('Location: experience.php?mode=Add&resumeID=' . urlencode($resumeID) . '&userID=' . urlencode($resumeUserID));
         } else {
             //Resume Updated now move to the main page.
             $_SERVER['PHP_SELF'];
         }
Exemplo n.º 2
0
        if (empty($userID) || empty($referenceID) || empty($relationship) || empty($companyName) || empty($rating)) {
            echo "Required Field is missing (User ID,Reference ID, Company Name, Relationship)";
        } else {
            //Check if Update or Create
            if ($mode == 'Update') {
                // Update Information
                $success = updateInformation('Update', $conn);
                if ($success == 1) {
                    // Successful Update return to the user information page
                    $conn->close();
                    header('Location: main.php');
                    exit;
                }
            } else {
                // Create
                $success = updateInformation('create', $conn);
                if ($success == 1) {
                    // Successful Update return to the user information page
                    $conn->close();
                    header('Location: main.php');
                    exit;
                }
            }
        }
    }
} elseif ($mode == 'Update') {
    $referenceID = $_GET['referenceID'];
    if (empty($userID)) {
        echo "User ID is missing";
    } elseif (empty($referenceID)) {
        echo "Reference ID is missing";
Exemplo n.º 3
0
            $success2 = updateInformation('update', 2);
            $success3 = updateInformation('update', 3);
            if ($success1 == 1 && $success2 == 1 && $success3 == 1) {
                // Successful Update return to main page
                $conn->commit();
                $conn->close();
                header('Location: main.php');
                exit;
            } else {
                $conn->rollback();
            }
        } else {
            // Create
            $success1 = updateInformation('create', 1);
            $success2 = updateInformation('create', 2);
            $success3 = updateInformation('create', 3);
            if ($success1 == 1 && $success2 == 1 && $success3 == 1) {
                // Successful Update return to main page
                $conn->commit();
                $_SESSION['userID'] = $userID;
                $conn->close();
                header('Location: main.php');
                exit;
            } else {
                echo $userID . "entered and ROLL BACK";
                $conn->rollback();
            }
        }
    }
} elseif ($mode == 'Update') {
    if (empty($userID)) {