Can I program a check on a save on an admin page?
Yes, use hook_form_FORM_ID_alter()

function MYMODULE_form_FORM_ID_alter(&amp;$form, &amp;$form_state, $form_id) {
  $form['#validate'][] = 'MYMODULE_some_validate_function';
  $form['#submit'][] = 'MYMODULE_some_submit_function';
}

function MYMODULE_some_validate_function($form, &amp;$form_state) {
  if ($form_state['values']['foo'] !== 'bar']) {
    form_set_error('foo', t('Foo must be bar'));
  }
}

function MYMODULE_some_submit_function($form, &amp;$form_state) {
  // Do something.
}


It's not possible to be any more specific than that as 'admin' pages vary in their structure. Most are created using a system_settings_form(), though, so there's a reasonable amount of consistency.

It's also worth noting that a form created with system_settings_form() saves its data in the variables table, so you can accomplish the same thing in a lot of cases with variable_set():

variable_set('site_name', 'New name');