Hello everybody,
Php:
I have a dropdown list box. This list box works. Problem is when I save the selected item. The list box could have 1 or 2 items per line, example “hard drive” or “monitor”, or “network card”. When I save the selection, it only saves the first word if the line consists of 2 words. I searched for an example on this site but I couldn’t quite find one that fits my problem.
If its “hard drive” it would save “hard” which is not what I want
If its “monitor” it would save monitor which is fine.
If its “network card” it would save “network” which is not what I want..
Any ides, friends
The dropdow list box code
echo "<td colspan='2'><font size='2'>Category:</font>";
echo "<select name='categoryfield' size='1'>";
foreach($categories as $dropdown)
{ echo "<option value=" . $dropdown . ">" . dropdown . "</option>";}
echo "</select>";
echo "</td>";
part of the code that saves the content of categoryfield
$add_query = "INSERT INTO classifieddb VALUES ('','$categoryfield','$databasetimestamp' ,'$descfield','$pricefield','$emailfield','$provicefield','$citefield','$countryfield','$onelinefield')";
categoryfield