Advertisement
Guest User

Untitled

a guest
Nov 26th, 2014
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. function atstump_preprocess(&$vars, $hook) {
  2. $vars['contact'] = array(
  3. 'name' => 'Doug Gillum',
  4. 'business' => 'Portland Stump Grinding',
  5. /...
  6. );
  7. }
  8.  
  9. <ul>
  10. <li><?php print $contact['name']; ?></li>
  11. <li><?php print $contact['phone']; ?></li>
  12. <li><?php print $contact['email']; ?></li>
  13. </ul>
  14.  
  15. Notice: Undefined variable: contact in eval() (line 2 of C:xampphtdocsstumpgrindingmodulesphpphp.module(75) : eval()'d code).
  16. Notice: Undefined variable: contact in eval() (line 3 of C:xampphtdocsstumpgrindingmodulesphpphp.module(75) : eval()'d code).
  17. Notice: Undefined variable: contact in eval() (line 4 of C:xampphtdocsstumpgrindingmodulesphpphp.module(75) : eval()'d code).
  18.  
  19. $GLOBALS['email1'] = 'example@email.com';
  20.  
  21. function mymodule_form_system_site_information_settings_alter ( &$form, &$form_state ) {
  22. $form['contact'] = array(
  23. '#type' => 'fieldset',
  24. '#title' => t('Contact'),
  25. );
  26. $form['contact']['contact_name'] = array(
  27. '#type' => 'textfield',
  28. '#title' => t('Contact name'),
  29. '#default_value' => variable_get('contact_name', ''),
  30. '#size' => 40,
  31. );
  32. }
  33.  
  34. <?php echo variable_get('contact_name', '');?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement