I am trying to write a email address to a file. the user enters there email addy and submits which brings them to the following code. however im unable to figureout what im doing wrong to write to the file. any ideas?
$myfile = file("data/mylist.lst");
$fh = fopen("data/mylist.lst","w");
for ($index=0; $index < count($myfile); $index++)
{ if ($Email != chop($myfile[$index])) {fputs($fh,$myfile[$index]);}
} fputs($fh,$Email."\n"); fclose($myfile); ?>
<a href="../index.php">Home</a>. </body></html>