Hi all
I'm having problems writing to my .txt, when I submit the data its not going to the text file. Can anyone help me?
Cheers
<?php
$name = $POST["Name"];
$email = $POST["Email"];
$age = $POST["radiobutton"];
$activities = $POST["activities"];
$rating = $POST["rating"];
$comments = $POST["comments"];
//writes this to a file
$file = fopen("c123456.txt","a");
//details
$details = "$name,$email,$age,$activities,$rating,$comments\r\n";
fputs($file, $details);
fclose($file);
?>
</p>
<p><strong>Name:</strong> <?php print "$name" ?><br>
<strong>E-Mail:</strong> <?php print "$email" ?><br>
<strong>Age:</strong> <?php print "$age" ?><br>
<strong>Activities:</strong> <?php print "$activities" ?><br>
<strong>Rating:</strong> <?php print "$rating" ?><br>
<strong>Comments:</strong> <?php print "$comments" ?></p>
<form>
<input type="button" value="Print Page" name="PrintBtn" onClick="window.print()">
</form>