hierselect and database

From: Date: Sun, 15 Jan 2006 16:52:17 +0000
Subject: hierselect and database
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-22541@lists.php.net to get a copy of this message
Hi I am using quickform and I would like to have a hierselect the first select is 'way of paying' with an array containing bank check, cash and credit card the second select contains either a list of bank, nothing or a list of credit card. as I already have a lot of bank in a table I woud like to use a query to the table for the second array $main = array(); $secondary = array(); $main[0] = "Check"; $main[1] = "Cash"; $main[2] = "Credit Card"; $secondary[0][x] = here I want to get the result from a table in the DB $secondary[1][y] = ""; $secondary[2][z] = "visa, etc"; $sel =& $form->addElement('hierselect', 'paiement', 'Paiement :'); $sel->setMainOptions($main); $sel->setSecOptions($secondary); $form->addElement('submit', 'btnSubmit', 'Submit'); etc. I could of course use the normal way to fill up the array, but I would prefer to use a pear technique Thanks in advance -- Philippe Rousselot <usergroup@alcatorda.com>

« previous php.pear.general (#22541) next »