i need to use selected value from the list box as a condition to a mysql query..
for example, i have database as follows
| Name | Number |
| sun | 3882
| sun | 3888
| sun | 3899
| ram | 3053
| ler | 3233
| ler | 3321
| ler | 3323
| sam | 3677
| joe | 3766
| scs | 3688
| kris | 3044
am just making a list box which consists of above names...
now when the user selects any of the name then i want the text box to be automatically filled by the numbers related to tat names...
i have tried below code. but i don know how to pass the selected value to next query which fetches the number..
can anyone help me giving some idea or sample code??
but when i used to pass the variable $total_numbers through onchange function, the alert results as "hi undefined"...
how to pass the result value $total_numbers to textbox through onchange function.. here is my code which shows result in textbox when submit button is cliked..
please is any other way to solve this?