function fwr ($q) { $msg=$q . "\r\n"; $filename = "pitanja.txt"; $f = fopen($filename, 'a'); fwrite($f, $msg, strlen($msg)); fclose($f); }