Hello:
I need to get the contents of a MySQL database field into a text file, and write the file to the server. I can not seem to get any filesystem functions to work, because it tells me I do not have permission to do anything. I am on virtual hosting, so it seems easier for me to try to FTP files to my own server.
Perhaps you guys can give me some pointers, this is kind of the idea I am running on:
$query = "SELECT message_body from POSTS";
$handle = mysql_query($query);
while($row = mysql_fetch_array($handle)) {
// write each $row[message_body] to individual text file, and FTP it to server
}
Thank you in advance!
Cody