Subtle difference in your name
declaration, which needs to be name="test[]"
.
<select name="test[]" id="test" multiple>
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="opel">Opel</option>
<option value="audi">Audi</option>
</select>
update_usermeta( $new_user, 'test', $_POST['test'] );
Edit re: your comment,
$meta = get_user_meta($user_id, 'test');
foreach ($meta as $key => $value) {
echo $value;
}
Related Posts:
- Show a list of recently viewed posts to a user
- How can I get global $post to work for CPT and update user?
- Gather posts into a cart/lightbox and share with another user
- Show number of posts by logged in user
- Update user meta when post published no working
- Should we trust the post globals?
- How to get the number of posts in a selected category?
- how to limit edit_form_after_title hook to page and post edit only?
- Add a checkbox to post screen that adds a class to the title
- How to cache a shortcode functions output?
- count number of posts (public , private , protected) by category name
- How to call function within a page/post, to dynamically generate content?
- Post Size Limit
- Looping through posts per category gives same posts for each category
- How to force update all posts after import
- Accessing $post variable from template part
- Programmatically inserting page breaks
- How to have different content in the loop and single
- Make “Post published. View post” Open in a New Tab
- Custom Post Type & Author not associating, user post count is 0, api doesn’t return author in post objects
- How can I extract the URL of a link from a post?
- New posts defaulting to ‘0’ primary key
- Save list from a custom meta box?
- Same content shared between multiple posts?
- How to add in title a date but with other color, like in iMDb titles?
- Remove custom posts that match taxonomy value
- Link button is not working while editing a post in Firefox [closed]
- How to get future ID for post which haven’t been created yet?
- Post Type Label Name
- Disable author profile in post
- Limit Gutenberg blocks available to users to choose from
- Display a post by ID attribute with shortcode
- Retain select value in select box
- How to set up multiple taxonomies for groups of posts
- Update admin side post list count text
- How can I set a Post’s default visibility to private and pending review checked
- Blog Posts in Custom Menu
- Receive each week the number of posts published
- How do I get blog posts to appear within CMS?
- Custom Post Type – Category Rewrite – Remove Rewrite from Sitemap
- Multisite: Can’t Post or Create Categories
- Query values from a Post Object Repeater [closed]
- limit to months rather than by number of posts
- Simultaneous admin updates causes custom fields to not update
- how to bulk add one line in the first paragraph of all posts
- Multiple Loops Breaking Pages
- Admin – no Featured image choice in create new/page|post
- Hook for changing excerpt content when excerpt not set
- How to exclude posts that already appear in the main loop, from the category loop
- How come a YouTube link isn’t transformed into a shortcode inside the post content?
- Display post number by category
- Add div before the first paragraph the_content [closed]
- Custom Post Limit for homepage only without plugin?
- Optimizing the blog loop
- Different number of posts per row in grid layout
- Static pages not working
- Setting limit to posts or page creation
- write a post on user registration
- Cannot select certain authors for posts after import
- Lightbox on wordpress post page
- Can Permalink structure of %postname%/%post_id% improve performance
- post/page content
- WordPress Architecture as a CMS – Posts & Pages
- Getting post and attached image from subdomain
- How to list post as buch of category, and all of them
- Is it to possible to insert a page in the post depending on the category ofthe post
- How to display a “NEW”-icon on posts from today
- How to automatically share posts on facebook?
- Is there a way to categorize a list posts all at once?
- Display “no post” message
- Not adding a new post?
- Prevent the automatic URL linking added in last update
- On the online version of my blog posts disappear
- Thumbnails and images in the blog post are not loading
- Automatically delete post in a single category when a new one is created
- Multiple posts in one page
- post__in no longer works in wordpress 5.0.3
- Re-order Category Meta-data
- Slug collision between page, taxonomy and custom post type
- Populate a drop down list with post titles across a multisite network
- What’s the best approach to create duplicated pages with paginated posts?
- including 404 page in post page
- How to allow some visitors to edit inline specific post
- Posts only showing on /localhost/wordpress/ and not on other pages
- How to change number of posts shown on homepage vs other pages?
- Posts are printed twice
- How to display most popular posts from certain category in sidebar?
- Is possible to do this from function.php
- Custom filter on all post page (admin backend)
- Make Show Notes for Individual Podcast Episodes Easy to Find (multiple URL’s?)
- Users cannot post when editor or admin on more than 1 site on multisite
- How can I create a menu items from meta box based on users input
- How can I count articles retrieved by tags
- WordPress strips some attributes for author posts
- Creating / Editing a post from within site template
- display only the title of the post into a certain category
- WordPress “Posts Page” isn’t showing template dropdown
- Post only showing on homepage when Logged in – direct URL still working
- How can I get on the same row two post of different categories?
- The WordPress wp_posts data table