Re: dynamic combo boxes

From: Date: Mon, 30 Sep 2002 21:14:49 +0000
Subject: Re: dynamic combo boxes
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-16083@lists.php.net to get a copy of this message
Sample Code: $strRET .= "<select name=\"Script\">"; $strRET .= "<option value=\"0\">Select Script:</option>"; $dialscripts = $GLOBALS['db']->query("SELECT * FROM dialscripts WHERE CO_ID=" . $_SESSION['CO_ID']); if (!DB::isError($dialscripts)) { while ($row = $dialscripts->fetchRow(DB_FETCHMODE_ASSOC)) { $strRET .= "<option value=\"" . $row['DSKey'] . "\""; if ($fldScript == $row['DSKey']) { $strRET .= "selected"; } $strRET .= ">" . $row['Script'] . "</option>\n"; } } $strRET .= "</select>"; -- Scott Carr OpenOffice.org Documentation Maintainer http://documentation.openoffice.org/ Quoting Tim Blackwell <timblackwell@hotmail.com>: > hi--i'm having some trouble autoloading a combo box with a mysql column. > could someone help please > > thanks, > > tim > > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > ------------------------------------------------- This mail sent through IMP: http://horde.org/imp/

« previous php.windows (#16083) next »