Problem In Getting Value From Select Option Using Ajax, Php And Mysql

Hi...
It's my first time to use ajax and I used it to get the bin_loc per lot_number where I choose in select option per ItemCode.
And now I get the bin_loc but the problem is I only get the bin_loc of the first select option the rest was not.

where this sends to select_code the <select> being changed, still, your problem is that bin_loc still has many rows, all of them with the same name, so what i would recomend is this :

in your php, you should do row counter, and add like a _$rowCounter to both, bin_loc and row_number, so you can point to the right control, else you will always be working on the first one since they all are named and id'ed the same

where this sends to select_code the <select> being changed, still, your problem is that bin_loc still has many rows, all of them with the same name, so what i would recomend is this :

in your php, you should do row counter, and add like a _$rowCounter to both, bin_loc and row_number, so you can point to the right control, else you will always be working on the first one since they all are named and id'ed the same