Hey,
I need to insert a an item from my drop down into MySQL. However at the moment i am getting all the values and i need to know if theres a way to submit the values individually.
So basically i want to insert into test.name the name in the drop down and insert into test.no the no next to the name. It works at the moment but everything goes into the name column echo "<select name=\"name\">" ; and no is empty. Any help would be appreciated
Thanks matt.
I need to insert a an item from my drop down into MySQL. However at the moment i am getting all the values and i need to know if theres a way to submit the values individually.
Code:
<?php
$sql="SELECT name, no FROM test";
echo "<select name=\"name\">";
echo "<option size=75>name | no</option>";
if ($result=mysql_query($sql)) {
while ($data=mysql_fetch_assoc($result))
{
echo "<option size=75>$data[name] $data[no]</option>";
}
}
else
{
echo "<!-- SQL Error ".mysql_error()." -->";
}
echo "</select>";
?>
Thanks matt.
Comment