PHP syntax regarding INSERT INTO
Posted on 2015-01-23
I am trying to write a statement that inserts 3 fields of data into multiple records. I believe my logic is correct but am having problems with the syntax. I've tried various combinations of "" and '' but still no success.
My statement is:
WHILE ($row = mysql_fetch_row($results))
"INSERT INTO tbl_cnpa_ic_comments
(eastern,file,comment) VALUES ('$eastern','$_POST[f".$row."]','$_POST[c".$row."]');"
Might someone offer a solution? Thanks.