<html>
<title>Status</title>
<body>
<form action="altaltstatus.php" method="post">
<input type="radio" name="status" value="Here"> Here<br>
<input type="radio" name="status" value="Away"> Away<br>
<input type="submit" name="submit" value="Update Status" />
</form>
<?php
if(isset($_POST['submit'])) {
$status = $_POST['status'];
if (in_array($status, ['Here','Away'])) {
file_put_contents(__DIR__.'/status.txt',$status);
}
else {
exit(1);
}
}
?>
</body>
</html>
- Output for 7.1.0 - 7.1.25, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.27, 8.2.0 - 8.2.17, 8.3.0 - 8.3.4
- <html>
<title>Status</title>
<body>
<form action="altaltstatus.php" method="post">
<input type="radio" name="status" value="Here"> Here<br>
<input type="radio" name="status" value="Away"> Away<br>
<input type="submit" name="submit" value="Update Status" />
</form>
</body>
</html>
preferences:
151.92 ms | 403 KiB | 167 Q