|
Posted by Hilarion on 12/30/05 14:31
>> while($wiersz=mysql_fetch_array($wynik,MYSQL_ASSOC))
>> {
>> echo "<option value=$wiersz>$wiersz</option> <br />";
>> }
>
> Try something like
>
> $value = $wiersz[$kolumna];
> echo "<option value='$value'>$value</option> <br />";
>
> (remember to enclose the value parameter of the <option> tag in quotes, or
> your XHTML code will be invalid)
To make sure it's valid, you should also use "htmlspecialchars"
function (if you use double-quotes around attribute values,
then you do not have to specify the second parameter for this function,
but if you use single-quotes - as in the example above - then you
should specify that "htmlspecialchars" should also escape single-quotes).
Hilarion
Navigation:
[Reply to this message]
|