Not getting the full value in $_GET[] variable
Posted: Tue Nov 27, 2007 9:19 am
Hi there,
I used value from database which contain space.But I can not send this value by GET method.When I retrieve the value of $_GET[' '] ,only get the value before space. If the value is 'IP Phone', i am getting only 'IP'.Here is my code:
I do not get the value after space by $_GET['category']. How can I get the full value?Any help?
I used value from database which contain space.But I can not send this value by GET method.When I retrieve the value of $_GET[' '] ,only get the value before space. If the value is 'IP Phone', i am getting only 'IP'.Here is my code:
Code: Select all
<select name="category">
<?php
new DbConnector();
$selectname = 'select distinct name from product';
$result = mysql_query($selectname);
while($line = mysql_fetch_row($result))
{
foreach($line as $value)
{
if($value=='IP Phone')
echo "<option value=$value selected=\"selected\">".$value."</option>";
else
echo "<option value=$value>".$value."</option>";
}
}
?>
</select>