function write_nomination_to_file($body, $log_file) { //open the text file for writing $handle = fopen($log_file, "a"); if ($handle) { //write the contents fwrite($handle, $body); //close the file; fclose($handle); return TRUE; } else { return FALSE; } }