Ik heb een fwrite function en dit lukt perfect alleen ik krijgt de output niet binnen html tags maar steeds erbuiten.
<?php
if ($total> "0") {
echo "<p>Total price is \$$total</p>\n"; }
if ($total> "0") {
$myFile = "pdf.php";
$fh = fopen($myFile, 'a') or die("can't open file");
$stringData = "Total price is\$$total\n";
fwrite($fh, $stringData);
fclose($fh); }
?>