Conditional default value of drop-down list

From: Date: Mon, 07 Apr 2003 07:26:37 +0000
Subject: Conditional default value of drop-down list
Groups: php.db 
Request: Send a blank email to php-db+get-26879@lists.php.net to get a copy of this message
Is it possible to create a drop-down list where the initial value displayed depends on a variable. Say I have a table called "categories" with columns "id" and "descr". Currently I populate the list with a query: $query = "SELECT descr from categories"; How could I make the default value of the list be conditional on the categories id? So if the variable categories id is "3", the initial value shown in that drop down menu will be the description of the category with id 3. Does this make sense? thanks, J __________________________________________________ Do you Yahoo!? Yahoo! Tax Center - File online, calculators, forms, and more http://tax.yahoo.com

« previous php.db (#26879) next »