I'm trying to write an admin script for a site and I want the script to be as generic as possible. On the first page, it provides a blank text box named value1, value2, value3, etc. until their are as many text boxes as there are columns. How can I create a looping SQL statement in PHP that places these values in the order (value1,'value2','value3') etc. Also, the script has to see whether the value is a data or number and in that case it does not put '' around it. Thank you in advance for your help. This problem has stumped me for the last day or so.