Is there any way i can able to execute the 3rd query? The selected columns where columns 6,7 and 8 The output of the second query are output1, output2 and output3 I want to update the selected columns with the informations from the second query

$query=mysql_query("SHOW COLUMNS FROM table LIKE 'SELECTEDCOLUMNS%'");
echo $column;

$query1=mysql_query("SELECT * FROM table WHERE <MY_CONDITIONS>");
echo ('<input type=text value="$grade" name="have no idea what to put here">');

$query2=mysql_query("UPDATE table SET `$column`='name of textbox'");