Commit 90199e12 authored by QuentiumYT's avatar QuentiumYT
Browse files

Write contact info to a file

parent 077c11d2
......@@ -15,7 +15,10 @@ if (isset($_POST['nom'])) {
$subject = "Contact de $nom $prenom";
// set the email body
$body = "Nom: $nom\n\nPrénom: $prenom\n\nEmail: $email\n\nTéléphone: $tel\n\nMessage:\n$message";
$body = "Nom: $nom\nPrénom: $prenom\nEmail: $email\nTéléphone: $tel\nMessage: $message";
// write content to a file
file_put_contents('data/contact.txt', $body . PHP_EOL . PHP_EOL, FILE_APPEND | LOCK_EX);
// send the email
// $success = mail($recipient, $subject, $body);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment