Posted by Geoff Berrow on 01/11/07 15:11
Message-ID: <g6kcq211hinohaqm5kls2qve4ki50duab6@4ax.com> from Peter
revera contained the following:
>$get = "SELECT * FROM categories";
>$answer = mysql_query($get)
>or die ("Couldn't execute query.");
>
> echo "<select name=listid' class='gradientform'>\n";
> while ($row = mysql_fetch_array($answer))
> {
> extract($row);
> echo "<option value='$itemid'>$item\n";
> }
> echo "</select>\n";
$get = "SELECT * FROM categories";
$answer = mysql_query($get)
or die ("Couldn't execute query.");
echo "<select name=listid' class='gradientform'>\n";
while ($row = mysql_fetch_array($answer))
{
extract($row);
$selected=(isset($_GET['listid']) &&$_GET['listid']==$itemid)?"
selected":"";
echo "<option value='$itemid'$selected>$item</option>\n";
}
echo "</select>\n";
--
Geoff Berrow 0110001001101100010000000110
001101101011011001000110111101100111001011
100110001101101111001011100111010101101011
Navigation:
[Reply to this message]
|