I get the following error message when I try this query:
$query .= "($tid, {$_POST['type']['$i']}, 'Y', NOW())";
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near
(18, , 'Y', NOW())' at line 1
Everything in my code works except this line. I know it has to do with $_POST array variable, but i don’t know the correct syntax.
If you need more code, I will be happy to include it.
Your use of single quotes around
$iis wrong:This will cause $i to be taken literally instead of the value of $i being used (which is what I assume you need).
This should work: