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:
le="color: #000000"><?php $select_str .= "<OPTION VALUE='$user'>$user</OPTION>n";

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!
le="color: #000000"><?php // 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 "<select name='users'>"; foreach($members as $member){ echo "<option value='".$member->getVar('uid')."'>".$member->getVar('uname')."</option>"; } echo "</select>";

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

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!

Latest GitHub Commits