Re: Saving DB Resuts to a file

From: Date: Fri, 12 Apr 2002 20:52:15 +0000
Subject: Re: Saving DB Resuts to a file
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-18460@lists.php.net to get a copy of this message
Hi there, I entered the code in as you described below, and it LOOKS on the screen as thought it is doing it, but when I look at the server there is no output file, can you see anything obvious that I am doing wrong? Thanks for your help. Chris $connection = mysql_connect("localhost","xxxxxx","xxxxxx") or die("Couldn't make a connection."); // select database $db = mysql_select_db("mailinglist", $connection) or die("Couldn't select database."); return $connection; $query = mysql_query("select * from emaillist"); fopen("/web/newsletter/test.txt", w); while ($row = mysql_fetch_array($query)) { fwrite("$row[EMail]\n"); echo $row[EMail]; } fclose("/web/newsletter/test.txt");

« previous php.db (#18460) next »