I have just started using PHP and mysql, and can view and manipulate the data in the database to display in my browser. So I'm over that hurdle.
But, I want to be able to update a number of columns depending on the value of an array during a while loop.
I am able to generate and view the variable, $viewablevariable, at the correct times during the loop but when I try to also slip this same value into the mysql database with this instruction (during the while loop):
$sql2 = "UPDATE $table_name SET columnvalue = '$viewablevariable' WHERE holdvaluecolumn = \"$changecolumnvaluethisrow\"";
it doesn't do anything. I've played with the syntax quite a bit (",',\", etc.) but still haven't been able to get it to work.
Also, I can use a terminal to change the mysql column values with the same kind of instruction, but I can't get anything to write into the mysql database during the while loop with PHP.
Anyone know what I'm doing wrong?