This is what I have right now:
<?php
if(isset($_POST['textdata']))
{
$data=$_POST['textdata'];
$fp = fopen('data.txt', 'a');
fwrite($fp, $data);
fclose($fp);
}
?>
It prints the submitted data in the same line inside the txt file, one big line without spaces.
So :
how do I set new line inside the txt file for each form submit
how to redirect to specific url after submit
I was trying form action="http://"
and it redirects, but doesn't print to the file.
Thanks.