Jump to content

[SOLVED] fputs() problem


Gnub

Recommended Posts

<?PHP

$filename = "todo.txt";
touch("$filename");
$file = fopen($filename, "w");
fwrite($file, "");
fclose($file);

$sql = "SELECT * from <table> LIMIT 100,0;";
$db = mysql_connect("N/A", "UName", "Pwrd");
mysql_select_db("UName",$db);
$result = mysql_query($sql,$db) or die(mysql_error());

while($row = mysql_fetch_array($result))
{ 

Print_r($row);
echo gettype($row);

$filename = "todo.txt";
touch("$filename");
$file = fopen("$filename", "a");

		 fputs($file, $row['Operators']." , 
".$row['PublicNote']." , ".$row['Email']." , ".$row['URL']." , ".$row['Include']." , 
".$row['CCC']." , ".$row['Tod']." , ".$row[bCC]." , ".$row['Amex']." , ".$row['CDW']." , 
".$row['BookingFee']." , ".$row['ABTA']." , ".$row['ATOL']." , ".$row['OfferID']." , 
".$row['OtherBond']." , ".$row['OfferLink']." , ".$row['AccRef']." , ".$row['NAM']." , 
".$row['Hotel']." , ".$row['Supplier']." , ".$row['Flights']." , ".$row['ACCOM']." , ".$row['Total']. "/n");
		 fclose($file);
}
?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.