RE: [PHP-DB] Code for drop down lists

2003-02-11 Thread NIPP, SCOTT V (SBCSI)
I would most definitely recommend pulling them from a DB table rather than hard coding these into a page. Here is a code snippet that I use to do this on one of my pages: mysql_select_db($Prod, $Prod); $query_systems = SELECT Name FROM systems ORDER BY Name ASC; $systems =

RE: [PHP-DB] Code for drop down lists

2003-02-11 Thread George Pitcher
If the list is something that may change more than just coccasionally, then use the database field value. If its going to be really static, then hard code it into the web form. Now the code: ?php $drop_down_list = select name=HEI_ID; $link = mysql_connect ('localhost', 'user', 'password') //

RE: [PHP-DB] Code for drop down lists

2003-02-11 Thread Gary . Every
Always use a DB when you can, makes it much easier to change params. Here's a snippet you can use: ### SELECT BOX CODE ### echo ' tdSELECT NAME=change SIZE=1'; $sql = SELECT * from ai.reports order by name; $selections =