1
Mazar
populating drop down selectbox with db results
  • 2009/9/30 9:39

  • Mazar

  • Not too shy to talk

  • Posts: 191

  • Since: 2009/1/4 0


Hi having problem to populate drop down box with db i know how to do that with php but can not figure owt with XOOPS form
global $xoopsDB;
            
$query $xoopsDB->query(' SELECT * FROM ' $xoopsDB->prefix('pages_sections'));
            
$myrow $xoopsDB->fetchArray($query);
            
$pageid $myrow['sections_id'];
            
$pagetitle $myrow['sections_link'];
$form->addElement(new XoopsFormSelect(_AM_PAGES_SECTIONS_PARENT"sections_parent"$pageid$pagetitle), false);

I did it like this but no result being shown. the results are being returned from database as used print result it was printing the returned results from db. but not working in selectbox

2
ghia
Re: populating drop down selectbox with db results
  • 2009/9/30 10:31

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


See this.

Login

Who's Online

173 user(s) are online (106 user(s) are browsing Support Forums)


Members: 0


Guests: 173


more...

Donat-O-Meter

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

Latest GitHub Commits