Utilizing admin panel values elsewhere in a module So I've got a custom admin panel page in a module I've written, and I want to get a value out of it.

Let's say I have a text box on this admin page, with a value, and I want to get that at some other point.

Do I need to use variable_set and put that into the database and then variable_get it in the function I want to use it in - or do I call it some other way?

Basically this thread:

https://drupal.org/node/2074589

Essentially, I just want to have a user be able to select a picklist value in the admin, and then call that picklist value later on in the actual module, for display.
You need to utilize system_settings_form when you write your admin form. 

function mymodule_admin_form($form, &amp;$form_state) {
  $form['my_textfield'] = array(
    '#type' =&gt; 'text',
    '#title' =&gt; 'Title',
    '#default_value' =&gt; isset($form_state['values']['my_textfield']) ? $form_state['values']['my_textfield'] : '',
  );

  return system_settings_form($form);
}


Submitting this form will call system_settings_form_submit which saves all the form fields as a variable, so you need to be careful when naming the form fields. 

Now all you need to do is call:

variable_get('my_textfield', 'default value to return if no value is set');

from any function after drupal is bootstrapped.

Here's more information on how to create a configuration form: Creating the configuration form