Created
February 10, 2018 20:00
-
-
Save kmill/0339e61ab6690aa2649668a87e9f48e1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$parts = explode("\n", $_POST['msg'], 2); | |
$msg = $parts[0]; | |
if (strlen($msg) > 0) { | |
$f = fopen("messages.txt", "a") or die("Unable to open file"); | |
fwrite($f, $msg . "\n"); | |
fclose($f); | |
} | |
echo "Success"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment