get_results( "SELECT * FROM {$wpdb->prefix}ace_register_fields ORDER BY sortby ASC ", OBJECT ); if( isset($_POST['submit'] )){ $password = serialize_text_field( $_POST['password'] ); $confirm_pass = serialize_text_field( $_POST['confirm_password'] ); foreach ($_POST as $post_keys => $post_values) { } if( $post_keys != ''){ unset($_POST['password']); unset($_POST['confirm_password']); unset($_POST['submit']); $update_detail = serialize_text_field( $_POST ); $myNewArray = array_combine( array_map(function($key){ return $key.'_'; }, array_keys($update_detail)), $update_detail ); if(update_user_meta( $current_user->ID , 'user_extrafields' ,$myNewArray ) == TRUE){ foreach ($_POST as $key => $update_user ) { update_user_meta( $current_user->ID, $key, sanitize_text_field($update_user) ); } $success = "  Successfull Update"; } } else { $error['empty_field'] = "Field empty"; } if( strcmp($password, $confirm_pass ) == 0 ){ if( !empty( $password ) && !empty( $confirm_pass )){ $password = md5( $password ); $tableName = $wpdb->prefix.'users'; $update_pass = $wpdb->query("UPDATE $tableName SET user_pass = '$password' WHERE ID =$user_ID"); echo "