i didn't fix it.. it's still not liking the first attempt... hmmm.
and the error thing you send didn't turn anything up either.
that's so fishy.
[UNSOLVED] fopen() YARGH!
Moderator: General Moderators
Try This
Rewrote it in functions that I understand and added some debug info 
Code: Select all
<?
$file = "surveys.txt";
$select = "SELECT * FROM `surveys` WHERE `Mem_ID` = ".$ID;
$export = mysql_query($select) or die(mysql_error());
while($row = mysql_fetch_assoc($export)){
print_r($row);
$fields = count($row);
for ($i = 0; $i < $fields; $i++){
$header .= mysql_field_name($row[$i])."\t";
$line = '';
foreach($row as $value){
if (empty($value)){
$value = "\t";
} else {
$value = str_replace('"', '""', $value);
$value = '"' . $value . '"' . "\t";
}
echo $value;
$line .= $value;
}
$data .= trim($line)."\n";
echo $data;
}
}
$data = str_replace("\r","",$data);
if (empty($data)){
$data = "\n(0) Records Found!\n";
} ELSE {
if (!$file_handle = fopen($file,"a")) { echo "Cannot open file"; }
if (!fwrite($file_handle, $data)) { echo "Cannot write to file"; }
header("Location: http://www.advantageboard.com/access/02 ... elcome.php");
fclose($file_handle);
}
?>Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.