Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function atstump_preprocess(&$vars, $hook) {
- $vars['contact'] = array(
- 'name' => 'Doug Gillum',
- 'business' => 'Portland Stump Grinding',
- /...
- );
- }
- <ul>
- <li><?php print $contact['name']; ?></li>
- <li><?php print $contact['phone']; ?></li>
- <li><?php print $contact['email']; ?></li>
- </ul>
- Notice: Undefined variable: contact in eval() (line 2 of C:xampphtdocsstumpgrindingmodulesphpphp.module(75) : eval()'d code).
- Notice: Undefined variable: contact in eval() (line 3 of C:xampphtdocsstumpgrindingmodulesphpphp.module(75) : eval()'d code).
- Notice: Undefined variable: contact in eval() (line 4 of C:xampphtdocsstumpgrindingmodulesphpphp.module(75) : eval()'d code).
- $GLOBALS['email1'] = 'example@email.com';
- function mymodule_form_system_site_information_settings_alter ( &$form, &$form_state ) {
- $form['contact'] = array(
- '#type' => 'fieldset',
- '#title' => t('Contact'),
- );
- $form['contact']['contact_name'] = array(
- '#type' => 'textfield',
- '#title' => t('Contact name'),
- '#default_value' => variable_get('contact_name', ''),
- '#size' => 40,
- );
- }
- <?php echo variable_get('contact_name', '');?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement