Easiest way may just be to write the message to a file, then include that file where you want the message to be displayed.
Here's a basic PHP solution.
home.php
Code:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Title</title>
</head>
<body>
<header>
<h1>Message of the day</h1>
<p><?php include('message.php'); ?></p>
</header>
</body>
</html>
admin.php
Code:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Title</title>
</head>
<body>
<header>
<h1>Update the message</h1>
</header>
</body>
</html>
<form method="post" action="change-message.php">
<textarea name="message"></textarea>
<input type="submit" value="Update the message" />
</form>
change-message.php
Code:
<?php
$fp = fopen('message.php', 'w');
fwrite($fp, $_POST['message']);
fclose($fp);
?>
Bookmarks