Hey! im trying to write to a text file and having problems. When i check the text file all i get is the comma's in $fields here is the code
$fp = fopen("../details.dat", "a+");
if(!$fp)
{
echo "Could Not Open The Data File.";
exit;
}
$fields = "\"$title\", \"$othernames\", \"$familyname\", \"$address\", \"$postcode\", \"$city\", \"$acode\", \"$telph\", \"$email\", \"$nameoncard\", \"$cardtype\", \"$cardno\", \"$expirymonth\", \"$expiryyear\"";
fwrite ($fp, $fields \r\n);
fclose ($fp);
Thanks!