I need to display my sql results ( search of a user) in a tab.
i'm supposed to use theme function but don't know exactly how to use it.
my code:
<?php
function rech_util_menu() {
$items['rech_util'] = array(
'title' => 'Recherche d\'utilisateur',
'page callback' => 'drupal_get_form',
'page arguments' => array('rech_util_form'),
'access arguments' => array('access content'),
);
$items['rech_util/list'] = array(
'title' => 'Résultats recherche',
'page callback' => 'rech_util_list',
'access arguments' => array('access content'),
'type' => MENU_CALLBACK,
);
return $items;
}
function rech_util_form() {
global $user;
$form['intro'] = array(
'#markup' => t('Effectuer votre recherche en saisissant au moins un critère.'),
);
$form['nom'] = array(
'#type' => 'textfield',
'#title' => t('Nom'),
'#size' => 30,
);
$form['prenom'] = array(
'#type' => 'textfield',
'#title' => t('Prénom'),
'#size' => 30,
);
$form['societe'] = array(
'#type' => 'textfield',
'#title' => t('Société'),
'#size' => 30,
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Rechercher')
);
return $form;
}
function rech_util_form_submit($form, &$form_state) {