Pulled out remaining hair trying to get this to work. Echo of incremented "qty" and "item" displays fine. However, no data is being updated to the table in this query. I have tried every combination of quotes, encased double quotes, etc. to know avail. Code below. The column names need to be incremented by one in each pass (qty2, qty3, qty4, etc. along with the variable data in each corresponding item2, item3, item4, etc.
$jobnumberselected = mysql_insert_id();
$x = 2;
do
{
$qty=${'qty'.$x};
$item=${'item'.$x};
echo $qty.$item;
mysql_query("UPDATE shoppinglist
SET $qty='$qty',item$='$item'
WHERE jobnumber=$jobnumberselected");
$x++;
}
while ($item !=='');