Hi. I want to have a query as below.
The value for $a variable is getting from the selection on drop down list. For example, the user select id=11, then the amount for this id is 10 which select from database. So how am I going to assign the value to $a based on the drop down selection of the user? Thanks in advance for any help.
Code:
$sql = "SELECT amount FROM payment WHERE id = '$a'"; $result = mysql_query($sql); $row = mysql_fetch_array($result); $amount = $row['amount'];
Comment