More Elegant PHP Form for Mapping Columns?

I need an input form that displays the existing columns of a table and
allows the user to input new names into each field.

The idea, as you probably know, is to map a couple of tables. My approach
was to extract the column names from the first table, loop through them all,
generate a form for each column, and collect them all. I’d then loop through
all the records of the new input file, and build the new one.
tables. But this strikes me as pretty wasteful, and something this
useful must either already be available, or should be much, much more
elegant. Like an existing form that already allows this. Or outputs
the input and output lists of names as one or two SQL tables. Or maybe
just a way to write entire columns all at once?

Is the brute force method the best I can do, or not?

Thanks!!

Sponsor our Newsletter | Privacy Policy | Terms of Service