WebbServerProg/www/public/Moment-3&4/dataBas/saveMSG.php

11 lines
354 B
PHP
Raw Permalink Normal View History

2024-09-16 08:26:33 +00:00
<?php
2024-09-23 10:08:18 +00:00
include('cleanData.php');
if(isset($_POST['message']) && $_SESSION['CSRFToken'] === $_POST['CSRFToken']) {
2024-09-16 08:26:33 +00:00
$name = "<hr><p>Från: " . $_SESSION['förnamn'] . ' ' . $_SESSION['efternamn'] ."</p>";
$msg = "<p>" . $_POST['message'] . "</p>";
2024-09-23 10:08:18 +00:00
$msg = cleanData($msg);
2024-09-16 08:26:33 +00:00
file_put_contents("../../msg.dat", $name . $msg, FILE_APPEND);
}
?>