Location: PHPKode > projects > ERPSOD > erpsod/exp_error.php
<?PHP
include_once("config.php");
$ok=role_check();
if (!$ok){
	header("Location: login.php"); 
}
$sql=" select * from taskerrors order by taskname";
$result = mysql_query($sql) or die(mysql_error());
// Put the name of all fields
$out  = "Taskname";
$out .="\n";
// Add all values in the table
while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
	$out .= trim("$row[0]" );
	$out .="\n";
}
// Output to browser
header('Content-type: text/richtext');
header("Content-Disposition: attachment; filename=Task_errors_exported.csv");
echo $out;
Return current item: ERPSOD