RE: [PHP-DB] Forms list from database
To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm On 01 November 2004 21:11, Jason T. Davidson wrote: Here is the code: form name=form1 method=post action=staff_code/add_code.php table width=600 border=0 align=center cellpadding=0 cellspacing=0 tr bgcolor=#CC td colspan=3 bgcolor=#FFdiv align=center select name=controller id=controller option /option option ? while ($check=mysql_fetch_array($result)){ print $check[LNAME],$check[FNAME]($check[CID]); } /option /select /div/td /tr I think you're missing some option/option tags -- these should be present around each value extracted from the database, so: while ($check=mysql_fetch_array($result)){ print option{$check['LNAME']},{$check['FNAME']}({$check['CID']})/option\n; } Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning Information Services, JG125, James Graham Building, Leeds Metropolitan University, Headingley Campus, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Forms list from database
I am trying to take information from a database and show that info in a forms list. I have been trying this with while(), but it never comes out and displays correctly. Any help would be appreciated. -- Jason Davidson -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Forms list from database
It might be usefull to see the code you are using to show the query results. --- Jason T. Davidson [EMAIL PROTECTED] escribió: I am trying to take information from a database and show that info in a forms list. I have been trying this with while(), but it never comes out and displays correctly. Any help would be appreciated. -- Jason Davidson -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php ___ ¡Llevate a Yahoo! en tu Unifón! Ahora podés usar Yahoo! Messenger en tu Unifón, en cualquier momento y lugar. Encontrá más información en: http://ar.mobile.yahoo.com/sms.html -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Forms list from database
Here is the code: form name=form1 method=post action=staff_code/add_code.php table width=600 border=0 align=center cellpadding=0 cellspacing=0 tr bgcolor=#CC td colspan=3 bgcolor=#FFdiv align=center select name=controller id=controller option /option option ? while ($check=mysql_fetch_array($result)){ print $check[LNAME],$check[FNAME]($check[CID]); } ? /option /select /div/td /tr -- Jason Davidson Juan Stiller wrote: It might be usefull to see the code you are using to show the query results. --- Jason T. Davidson [EMAIL PROTECTED] escribió: I am trying to take information from a database and show that info in a forms list. I have been trying this with while(), but it never comes out and displays correctly. Any help would be appreciated. -- Jason Davidson -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php ___ ¡Llevate a Yahoo! en tu Unifón! Ahora podés usar Yahoo! Messenger en tu Unifón, en cualquier momento y lugar. Encontrá más información en: http://ar.mobile.yahoo.com/sms.html -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Forms list from database
Assuming, for the moment, that there's more code above that to actually support this... You want to be quoting the keys in the array, and containing each array 'lookup' in {}s: print $check[LNAME],$check[FNAME]($check[CID]); Should be print {$check['LNAME']},{$check['FNAME']}({$check['CID']}); However - in the future, try to include all relevant code. The surrounding table code isn't important, but the code you're using for your query and to connect to the database/etc. is. - Martin Norland, Database / Web Developer, International Outreach x3257 The opinion(s) contained within this email do not necessarily represent those of St. Jude Children's Research Hospital. -Original Message- From: Jason T. Davidson [mailto:[EMAIL PROTECTED] Sent: Monday, November 01, 2004 3:11 PM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] Forms list from database Here is the code: form name=form1 method=post action=staff_code/add_code.php table width=600 border=0 align=center cellpadding=0 cellspacing=0 tr bgcolor=#CC td colspan=3 bgcolor=#FFdiv align=center select name=controller id=controller option /option option ? while ($check=mysql_fetch_array($result)){ print $check[LNAME],$check[FNAME]($check[CID]); } ? /option /select /div/td /tr -- Jason Davidson Juan Stiller wrote: It might be usefull to see the code you are using to show the query results. --- Jason T. Davidson [EMAIL PROTECTED] escribió: I am trying to take information from a database and show that info in a forms list. I have been trying this with while(), but it never comes out and displays correctly. Any help would be appreciated. -- Jason Davidson -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php ___ ¡Llevate a Yahoo! en tu Unifón! Ahora podés usar Yahoo! Messenger en tu Unifón, en cualquier momento y lugar. Encontrá más información en: http://ar.mobile.yahoo.com/sms.html -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php