2
I have a select named after a product.
I want you to select the product name via dropdown it automatically fills a input code of the respective product. The information is in a single table, in case id, id_produto, nome ,serial, log
.
I can pull the dice to the dropdown but I don’t know how to link a input with the id_produto
.
I hope I got past my doubt.
<select name="produto" id="produto">
<?php $sql = mysql_query("select * from produto");
while ($row = mysql_fetch_array($sql)) {
print '<option value="'.$row['nome'].'">'.$row['nome'].'</option>';
}
?>
</select><br/>
Your code has no JS?
– Papa Charlie
has yes, I can even link data from other tables, I just don’t know how to do it pulling from the same where I’ve done the select of "name".
– Thiago
Do you want when the select is chosen the ID to fill in an input field? That’s it?
– Papa Charlie
I want that when I select the product name, it automatically fills an input with the internal code of the product.
– Thiago