Posted by Geert-Jan van Leeuwen on 01/18/07 10:32
I am using the html <select>-<option> code to select options i read from
mysql:
echo "<select name=status> ";
$query = veilige_query("
select id, status
from status
order by id
");
while ($regel = mysql_fetch_array ($query))
{
echo "<option value=" . $regel["status"] . ">" .
$regel["status"];
}
echo "</select>";
If in an option there are spaces it only returns the part until the space.
For example:
The mysql table has a value "In public". On the html-page I see "In
public", the returned result is: "In". So it skipped everything after
the space. When I read values using
<input type=text name=so-and-so>
it reads everything allright.
I am missing something in php. What am i doing wrong?
Thanks,
Geert-Jan
Navigation:
[Reply to this message]
|