ak85
ak85

Reputation: 4264

Unable to insert a string into array

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

Answers (1)

Niet the Dark Absol
Niet the Dark Absol

Reputation: 324750

Erm... just type " around the values?

 $sql2 .= '("' .$_POST['column1'][$i] . '", "' . $_POST['column2'][$i] . '")'; 

Upvotes: 3

Related Questions