Fetch columns of the mysql database table into a selectbox

I want fetch columns of the mysql database table into a selectbox and then transfer the columns into another table which is in another select box.

I’m having a deja vu…