HTML_QuickForm_advmultiselect: error
| From: | l Burnerheimerton | Date: | Thu, 01 Sep 2005 12:39:37 +0000 |
| Subject: | HTML_QuickForm_advmultiselect: error | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-20722@lists.php.net to get a copy of this message | ||
Laurent - I like your new example of what we discussed
recently on this forum - setting selected values using
a MySQL database.
I copied your example code and substitued in a new DB
connection (that works through the site using $db) and
the following SELECT statements:
$queryAll = 'SELECT people_ID, CONCAT(lName, ", ",
fName) AS personName FROM people';
$querySel = 'SELECT people_ID FROM people WHERE
people_ID = 17';
And changed the LOAD statement to accomodate my
nomenclature:
$ams->load($db, $queryAll, 'personName', 'people_id',
$affected_user);
It displayed but threw the following 3 errors:
Notice: Undefined index: people_id in
\pear\lib\HTML\QuickForm\select.php on line 369
Notice: Undefined index: people_id in
\pear\lib\HTML\QuickForm\select.php on line 369
Notice: Undefined index: people_id in
\pear\lib\HTML\QuickForm\select.php on line 369
It displayed the blank option in the affected list.
When processed (click the SEND button), it displayed
the correct number of arrays but no array values were
sent:
Array
(
[user] => Array
(
[0] =>
[1] =>
[2] =>
)
[send] => Send
)
The only difference I can see is that your database
key is "userid VARCHAR(5)". Mine is INT.
Any ideas? Many thanks!
____________________________________________________
Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs