Reputation: 4264
I have this accepted answer working well, where column 1 and column 2 are setup as varchar. When I insert a string into the form however it doesn't insert data into my database. I know that this is because I don't have quotation marks eg "value" around my string but I don't know how to handle this in php? Does anyone have any ideas here?
Upvotes: 1
Views: 51
Reputation: 324750
Erm... just type "
around the values?
$sql2 .= '("' .$_POST['column1'][$i] . '", "' . $_POST['column2'][$i] . '")';
Upvotes: 3