I guess you could do it...
First you need to create yourself a text file.
$fp=fopen("myfile.txt", "a");
then you query database
$sql="select user_id, date, time, name from my_table";
$result=mysql_query($sql, $conn);
Now fetch stuff out of the $result, and write it to the new file.
while($res=mysql_fetch_array($result))
{
fwrite($fp, "<$res[user_id]><$res[date]><$res[time]><$res[name]>");
fwrite($fp, "\n");
}
Now close file and mysql descriptors
fclose($fp);
mysql_close($conn);
Of course you can use file_exists() function first before you create the file. Or use tempnam() to generate unique filename.
Di