I have a field where i know for sure the entries would be something like Edward, John, Jacob in a input field.
Now, i am trying to insert a new row for each of the people. I am doing this:
$person = mysql_real_escape_string($_POST['person']);
foreach($person_array as $value)
{
$insert = "INSERT INTO people (Person)
VALUES ('".$value."')";
$query = mysql_query($insert) or die ("Error: ".mysql_error());
}
Using the above query i am unable to insert into the table. What am i doing wrong?