WordPress.org

Ready to get started?Download WordPress

Forums

Checkboxes (3 posts)

  1. trinzia
    Member
    Posted 2 years ago #

    Hi,

    I'm making a form with checkboxes, and I need to have the values available to use. Although they are in the URL, the values keep showing as NULL. I'd also like the settings to persist for each user, at least for the duration of the session.

    I found this page:
    http://wordpress.stackexchange.com/questions/4991/how-to-use-checkbox-and-radio-button-in-options-page

    Should I use register_setting? That seems to be for admin functions, and this is a user function. Is there another tutorial somewhere on how to use form values?

    Thanks.

  2. bcworkz
    Member
    Posted 2 years ago #

    I'm sure there's a tutorial for this somewhere, I just don't know where. In general, you specify your server page that handles the form data as the form's action, the method is usually either GET or POST.

    Your server page can access the sent form values via either $_GET["name"] or $_POST["name"]. You can store user data using update_user_meta() and manage the data with related functions. This storage method persists indefinitely in the usermeta table.

  3. trinzia
    Member
    Posted 2 years ago #

    Thanks, I will find that function useful.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.