I'm trying the following, but its saying that its an invalid argument for the foreach?
<?
$file = "list.txt";
if(!($fp = fopen($file, "r"))) die ("cannot open $file");
$contents = fread ($fp, 1024);
include("include.php");
foreach($contents as $email){
$query = "INSERT INTO (email) VALUES('$email');";
$result = MYSQL_QUERY($query, $conn);
if(!$result){
die(MYSQL_ERROR());
}
}
fclose($fp);
print $contents;
?>