function getUserForID($userId)
 {
     $user = new User();
     ini_set('display_errors', 'On');
     $db = "w4111c.cs.columbia.edu:1521/adb";
     $conn = oci_connect("kpg2108", "test123", $db);
     $stmt = oci_parse($conn, "select * from users where user_Id='" . $userId . "'");
     $rows = oci_execute($stmt);
     oci_close($conn);
     while ($row = oci_fetch_assoc($stmt)) {
         echo $row['LOGIN_ID'];
         $user->setUserId($row['USER_ID']);
         $user->setPassword($row['PASSWORD']);
         $user->setFirstName($row['FNAME']);
         $user->setLastName($row['LNAME']);
         $user->setLoginId($row['LOGIN_ID']);
         $user->setEmailId($row['EMAIL_ID']);
         $user->setAddress($row['ADDRESS']);
         $user->setPhoneNumber($row['PHONE_NO']);
         $user->setSecurityAnswer($row['ANSWER']);
         $user->setSecurityQuestion($row['QUESTION']);
         $user->setMiles($row['MILES']);
     }
     return $user;
 }
    $validator->addValidation("passwordRecoveryQues", "req", "Please fill in password recovery question");
    $validator->addValidation("passwordRecoveryAns", "req", "Please fill in password recovery answer");
    $validator->addValidation("email", "email", "The input for email should be a valid email value");
    $validator->addValidation("email", "req", "Please fill in email");
    if ($validator->ValidateForm()) {
        $_SESSION['action'] = "updateUser";
        $user = new User();
        $user->setUserId($_SESSION['userId']);
        $user->setLoginId($user1->getLoginId());
        $user->setPassword($_REQUEST["password"]);
        $user->setFirstName($_REQUEST["firstName"]);
        $user->setLastName($_REQUEST["lastName"]);
        $user->setEmailId($_REQUEST["email"]);
        $user->setAddress($_REQUEST["address"]);
        $user->setPhoneNumber($_REQUEST["phoneNo"]);
        $user->setSecurityAnswer($_REQUEST["passwordRecoveryQues"]);
        $user->setSecurityQuestion($_REQUEST["passwordRecoveryAns"]);
        $_SESSION['userToBeUpdated'] = serialize($user);
        header("Location: ../controller/Controller.php");
    } else {
        echo "<B>Validation Errors:</B>";
        $error_hash = $validator->GetErrors();
        foreach ($error_hash as $inpname => $inp_err) {
            echo "<p>{$inpname} : {$inp_err}</p>\n";
        }
    }
}
$disp_loginName = isset($_POST['loginName']) ? $_POST['loginName'] : $user1->getLoginId();
$disp_password = isset($_POST['password']) ? $_POST['password'] : $user1->getPassword();
$disp_firstName = isset($_POST['firstName']) ? $_POST['firstName'] : $user1->getFirstName();
$disp_lastName = isset($_POST['lastName']) ? $_POST['lastName'] : $user1->getLastName();