<form action="editinfo.php" method="post">
<pre><textarea rows="440" name="editinfo" cols="700"></textarea></pre><br><br>
<input type="submit" class="ButtonSub" value="Submit">
</form>
editinfo.php
$editinfo = mysqli_real_escape_string($connd, $_POST['editinfo']);
$myfile = fopen("myinfo.txt", "wb") or die("Unable to open file!");
fwrite($myfile, $editinfo);
fclose($myfile);
What I want to achieve? Let's say I have editinfo text is
SAM
PLEM
it outputs SAM
PLEM
in the txt, how can I format it correctly? so it can look like
SAM
PLEM