You are here: php skips spaces « All PHP « IT news, forums, messages
php skips spaces

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация