<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.20, 7.2.0 - 7.2.33, 7.3.16 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.4, 8.3.6
- <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>
- Output for 8.3.5
- Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
<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:
207.02 ms | 402 KiB | 163 Q