WordPress.org

Forums

User Domain Whitelist
Insert form value into plugin's option_value in database (3 posts)

  1. bhanuchawla
    Member
    Posted 2 years ago #

    I'm using this plugin on my WP installation which works out of the box.
    I have a form on the site which inputs domain names. I want to be able to store these domain names into the plugin's option_value in the wp_options table. How do I do that using PHP?
    This is how the plugin stores the value in the database:

    a:4:{s:4:"mode";s:5:"white";s:16:"domain_whitelist";s:62:"facebook.com
    .edu
    .test
    hotmail.com
    test.co.uk
    test.co.in";s:16:"domain_blacklist";s:0:"";s:18:"bad_domain_message";s:58:"The email address entered is not within an allowed domain.";}

    The next question is that once the domains are added to this list via a form then how do I change the value of s:62 which changes every time a domain is added/updated/deleted from the list.

    I noticed that 62 in "s:62" is the number of characters in the list (and it counts 2 characters for "return"). How do I change this value using PHP or $wpdb in the form when the domains are inserted into the database?

    Any help is appreciated.

    Cheers

    Bhanu Chawla

    http://wordpress.org/extend/plugins/user-domain-whitelist/

  2. bhanuchawla
    Member
    Posted 2 years ago #

    FYI,
    HMUserDomainWhitelistOptions is the option_name and
    562 is the option_id

    Cheers

  3. sanket.realistic
    Member
    Posted 1 year ago #

    Hi friends

    i have a form which includes many details and 5 image uploader.Actually it is for real estate. so is there any plugin for this.

    Best
    Sanket

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • User Domain Whitelist
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic