I have a id
of the table, example:
user with id = 1
, how can I get the name of this user using id
of it and show on input
?
I did so:
while ($dados = mysql_fetch_array ($sql)) {?>
<option value="<?php echo $dados["id"] ?>" ><?php echo $dados["nome"]; ?></option>
When he selects the option to show in a input
the description of what it would be, for example:
-
id = 1
: banana (show banana no input) -
id = 2
: meat (show meat not input)
I know it's an esdrúxulo example because I do not know how to explain