I want to create form close to standard http://site/user/user
Could you tell me How I can add paging and sorting by fields (Username, Member for etc).
my version
1.
function users_list_page() {
2.
3.
$form = array();
4.
$site_users = array();
5.
$result = db_query("SELECT uid, name, status FROM {users} WHERE status = 1");
6.
7.
while ($u = db_fetch_object($result)) {
8.
array_push($site_users, $u->name);
9.
}
10.
11.
$form['site_users'] = array(
12.
'#type' => 'checkboxes',
13.
'#title' => t('Select user'),
14.
'#description' => t('Add user to role who can post without moderation.'),
15.
'#options' => ($site_users),
16.
'#value' =>($site_users)
17.
);
18.
19.
$form['submit'] = array(
20.
'#type' => 'submit',
21.
'#value' => t('Submit'),
22.
);
23.
24.
return $form;
25.
}
Comments
This is a sample code for
This is a sample code for drupal 5.x that i am using.
THis is not my exact code changed for your need.
I think this will work and you need to modify the query and change it to your convenience
may be slight modification is needed.
Hope this will help
Cheers