This post is a follow on from the following thread:
As it stands my code looks like this and it does exactly what I want it to do
The problem I have, is where the words callcentreColumn1 exists. This can/will be different nearly every time, so my question is how to correctly use the correct variable.
The variable name is been received using:
Therefore the $column maybe equal to callcentreColumn1 or accountsColumn1 or lionsColumn1 etc
I hope I am being clear.
As it stands my code looks like this and it does exactly what I want it to do
Code:
// MySQL Connection String
$column=$_GET[thedesc];
parse_str($_POST['data']);
for ($i = 0; $i < count($callcentreColumn1); $i++) {
// The following line is for the MySQL query.
mysqli_query($db,"INSERT INTO tablename (Tabname,ColumnNumber) VALUES('$column','$callcentreColumn1[$i]')");
}
The problem I have, is where the words callcentreColumn1 exists. This can/will be different nearly every time, so my question is how to correctly use the correct variable.
The variable name is been received using:
Code:
$column=$_GET[thedesc];
I hope I am being clear.