@humphrey not sure if I fully understand you. Anyways the code looks incorrect. You do an insert after looping through a result set. So you will insert the value of the last row in your result set. I think you want to insert after a form is submitted, not after printing a select box. Do you follow?