I need help with this code:
This code is supposed to get all values from the $_POST array and write them to a file called "mail.txt".
But, I am unable to leave a line after the fwrite method is carried out. In other words, the \n next line command seems not working at all. Hope you guys here can help.
| Code: |
| <?php
$fh = fopen("mail.txt", "w"); $message = ""; foreach ($_POST as $field => $value) { fwrite($fh,"$field = $value\n"); } fclose($fh); ?> |
This code is supposed to get all values from the $_POST array and write them to a file called "mail.txt".
But, I am unable to leave a line after the fwrite method is carried out. In other words, the \n next line command seems not working at all. Hope you guys here can help.
