Failed to write correctly in existing text file.. Is there a way to display correctly the post values? Thanks in advance.
$mar1 = $_POST['id'] . PHP_EOL;
$mar2 .= $_POST['titel'] . PHP_EOL;
$existing = file_get_contents('stan.txt');
$fp = fopen('stan.txt', 'w');
$myString = '<h6><a href="$mar1-$mar2.php">$mar1 $mar2</a></h6>'. PHP_EOL;
fwrite($fp, $existing. $myString);
fclose($fp);
$mar1 $mar2
instead ofvalue1 value2
– user13427804 Oct 27 '20 at 20:10