I'm trying to get a value that is associated (through mysql data-base row) to a unique Id through an option form:
<form>
<td>
<select name='rolo'>
<option value='$id'>$item</option>
</td>
<td>
$value
</td>
</select>
</form>
So, when I choose an option, I get the correspondent $value associated with it in the next .
What I have tried so far:
$query = "SELECT * FROM rolostock WHERE id='$id' ";
$result = mysql_query($query);
while ($row = mysql_fetch_array($result)) {
echo $row['value'];
}
I am not a php expertise, and I thought this would do it? Thanks in advance!
EDIT:
What i'm trying is to (html form) SELECT > OPTION $id > (php) get $value of $id in the next (html) TD . :\
echo mysql_error();put after your query