$_POST['gwpm_education'] = $gwpm_education; $dynaKeys = getDynamicFieldKeys(); foreach ($dynaKeys as $__keys) { echo "<br /> Dyna: " . $__keys; $_POST[$__keys] = "" . rand(1, 3); } $abt = createDateRangeArray('1980-10-01', '1985-10-05'); $newdata = $abt[0]; echo $newdata . "<br />"; $_POST['gwpm_dob'] = $newdata; // $profileObj = new GwpmProfileVO($_POST); $profileObj = new GwpmProfileVO($_POST, $dynaKeys); $profileObj->gwpm_profile_photo = $_FILES["gwpm_profile_photo"]; $validateObj = $profileObj->validate(); if (sizeof($validateObj) == 0) { $mymodel->updateUser($profileObj); echo __('success_message', 'Profile updated successfully!!' . '<br />'); } else { echo __('Please correct the below fields: ' . '<br />'); print_r($validateObj); echo "<>br />"; } } if (sizeof($userIdList) > 0) { global $wpdb; $table_name = $wpdb->prefix . "usermeta"; $column_name = $wpdb->prefix . 'user_level'; $column_name_2 = $wpdb->prefix . "capabilities"; echo $table_name . '-' . $column_name . ' - ' . implode(',', $userIdList); foreach ($userIdList as $_userId) { $queryString = "update {$table_name} set meta_value = 1 WHERE meta_key = '{$column_name}' AND user_id = %s ";