the below code i am used to retrieve data from table to the list. it is working. but when i am trying to insert value from this list to another table, it inserts only the first word of each list value.
eg: for "On Process", it inserts only "On".
can anybody help me to recover from this error? i am very new to php.
<select name="client" size="1" class="maintext" id="client">
<?php
error_reporting (E_ALL ^ E_NOTICE);
$con = mysql_connect("localhost","root","");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("employee", $con);
$result = mysql_query("SELECT * FROM client ORDER BY cl_value asc");
while($row = mysql_fetch_array($result))
{
echo "<option value=".$row['cl_value'].">".$row['cl_name']."</option>";
}
mysql_close($con);
?>
</select>