I am using some code to write form data to a text file. The code is:
$username = $_POST['user'];
$email = $_POST['mail'];
$data = "$username | $email\n";
//open the file and choose the mode
$fh = fopen("users.txt", "a");
//close the file
This writes a name and Email address entered into a form into the text file users.txt.
What I would like is after the email address for it to enter today's date as well. How can I achieve this?
Many thanks as always.