I'm a newbie still trying to get used to syntax and whatnot. Hopefully the pros can give me a sense of how to write some simple code.
I'm trying to put the results from a search of table1 and a separate $_POST(variable) into table2.
I've got this, but don't know how to work in the POST variable.
$variable1 = trim($_POST['item_id']);
$variable2 =trim($_POST['anothervariable']);
$query = “INSERT INTO "table1"(item_id, column2) SELECT (column) FROM "table2" WHERE column_in_table2 ="$variable2"......
//here's where I'm not sure what to tell my code to put $variable1 into item_id