Hello:

I'm trying to create dinamic color SELECT lists with php. I have my
database set up as follows:

Paint = good
bucket = good
weight = 100kg
Colors = green, blue, red

and here is my php:

while ($row = mysql_fetch_array($sql_result)) {
echo"<tr><td>";
echo $row["paint"];
echo"</td><td>";
echo $row["bucket"];
echo"</td><td>";
echo"<form action=\"http://www.\" method=\"POST\">";
$Color  = $row["Color"];
if ($Color == $Color) {
$option .= "<OPTION value=\"$Color\" selected>$Color</OPTION>";
} else {
$option .= "<OPTION value=\"$Color\">$Color</OPTION>";
}
echo"<select name=\"Colors\">";
echo "$option";
echo"</select>"; 

as you can see I end up with a select menu with this "green, blue, red"
as the only option.

is there a way I can tell php3 to break it down at "," so I can actually
have a drop down menu         

Thanks ahead:
Gerry Figueroa
----------------------------------
Modern Confucius:
Man who run in front of car get tired.
----------------------------------

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to