foreach ($nombres_array as $nombres_insert)
$query = 'INSERT INTO opertunidades (mail) VALUES ("'.$nombres_insert.'")' or die (mysql_error());
$result = mysql_query($query);
HOwever this doesnt work, well it does but only inserts the first name of the array. How do i make a insert that will insert them all. like below
id name
1 jack
2 jill
3 diddly
Last edited by ol4pr0 on Tue Aug 31, 2004 8:33 am, edited 1 time in total.
You just appear to be missing {} , without them only the $query = line is 'inside' the foreach. Also the or die ... should be part of the mysql_query not the query string.