WebbServerProg/www/public/Moment-3&4/pages/klotter.php

18 lines
545 B
PHP
Raw Permalink Normal View History

2024-09-23 10:08:18 +00:00
<?php
if (!(isset($_SESSION['inloggad']))) {
echo 'Du är inte inloggad';
} else {
$Token = $_SESSION['CSRFToken'];
echo "<h1>Klotterplanket</h1>
<form method='post'>
<label>Meddelande</label><br>
<textarea name='message' cols='45' rows='5'></textarea><br />
<input type='hidden' name='CSRFToken' value='$Token'>
<input type='submit' value='Skicka'>
</form>";
include('dataBas/saveMSG.php');
if (file_exists("../../msg.dat")) {
echo file_get_contents("../../msg.dat");
}
}