I have a drop down menu to select variable from database. It is in table correct (ie: Van's Category). However after I select field and try to input into another table, I only get (Van's)...it stops at the space.... does anyone know whats up? Here is code...
populates drop down box:
<select name="category" id="category">
<option selected>Please Choose a Category</option>
<?php
result = mysql_query("SELECT * FROM ece211categories ORDER BY id ");
while ($myrow = mysql_fetch_array($result)) {
print ("<option value=$myrow[category]>$myrow[category]</option>\n");
}
?>
inserts into new table:
$sql = "INSERT INTO ece211lectures (name, file_name, category) VALUES ('$name', '$file_name', '$category')";
mysql_query($sql);
I think it has to do with the fact I am using print to populate the drop down box. it stops when it sees a space I think....
I dont know....please help