ilbuonsik
New Member
Good morning,
I need write a file using the data submitted in a form.
I insert this php script at the "End of form submission (onAfterProcess)":
I write this code reading other post, but i can't write the data! I write only "\n \n"
I need write a file using the data submitted in a form.
I insert this php script at the "End of form submission (onAfterProcess)":
PHP:
$Pratica = $formPratica->formData['Pratica'];
$Stato = JRequest::getVar('Stato');
$Timestamp = JRequest::getVar('date_time');
$myFile = "testFile.txt";
$fh = fopen($myFile, "a");
$stringData = ($Pratica . '\n' . $Stato . '\n' . $Timestamp);
fwrite($fh, $stringData);
fclose($fh);
I write this code reading other post, but i can't write the data! I write only "\n \n"