1
kaotik
Dropdown with all users
  • 2004/11/18 15:45

  • kaotik

  • Just can't stay away

  • Posts: 861

  • Since: 2004/2/19


Hi
How do I create a dropdown with all XOOPS users? I want to put this in an admin form using:
$select_str .= "$user'>$usern";

using echo

I tried searching through the forums but couldn't find anything.

Thanks

2
ejuden01
Re: Dropdown with all users
  • 2004/11/19 21:42

  • ejuden01

  • Not too shy to talk

  • Posts: 121

  • Since: 2004/4/5 1


Hopefully that helps out!
// First you need to get the member handler
$member_handler =& xoops_gethandler('member');

// Next will be to retrieve all of the member objects
$members =& $member_handler->getUsers();

// Next will be to populate the select box with the users
echo "";
foreach(
$members as $member){
    echo 
".$member->getVar('uid')."'>".$member->getVar('uname')."";
}
echo 
"";

3
kaotik
Re: Dropdown with all users
  • 2004/11/22 2:18

  • kaotik

  • Just can't stay away

  • Posts: 861

  • Since: 2004/2/19


Thanks ejuden01!
That's exactly what I was looking for!

Big, big thank you once again!

Login

Who's Online

297 user(s) are online (267 user(s) are browsing Support Forums)


Members: 0


Guests: 297


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits