I have this table: (not real names)
id | username | password | number
--------------------------------------------------
1 | john | password_j | 43
2 | mary | password_m | 453
3 | peter | pass_p | 4343
4 | ags | pass_a | 332
I know how to select everything and put in into one drop-down style listbox. Now I need a script that will get the 'number' value for the selected 'username' in the listbox.
Got it? Or no?
OK.
Example: The user selects the 'peter' value in the listbox for username. I want a variable - $number to be filled with the contents of the number column for the name peter, in this case it is 4343.
Another example: The user selects 'ags' and clicks the Submit button. Then the $number variable should be filled with the number 332 (in the 'ags' level, with the same id). Then a simple echo would be good for the $number variable.
Got it now?
Really need help for this thing.
Thanks in advance.
id | username | password | number
--------------------------------------------------
1 | john | password_j | 43
2 | mary | password_m | 453
3 | peter | pass_p | 4343
4 | ags | pass_a | 332
I know how to select everything and put in into one drop-down style listbox. Now I need a script that will get the 'number' value for the selected 'username' in the listbox.
Got it? Or no?
OK.
Example: The user selects the 'peter' value in the listbox for username. I want a variable - $number to be filled with the contents of the number column for the name peter, in this case it is 4343.
Another example: The user selects 'ags' and clicks the Submit button. Then the $number variable should be filled with the number 332 (in the 'ags' level, with the same id). Then a simple echo would be good for the $number variable.
Got it now?
Really need help for this thing.
Thanks in advance.