<form action="" method="get">
<div id= "window"><center><input id="chatbox" type="text" name="chatbox">
<br></center></div>
</form>
<?php
$myfile = fopen("chat.txt", "a+")
$chattext = $_GET['chatbox'];
fwrite($myfile, $chattext);
fclose($myfile);
?>
I have looked at other solutions but for some reason I can't make my code work. My goal is to take the text in the text field and write it to the chat.txt file. I am very new to php so it is definitely possible that I just made a stupid syntax error. Thank You for your help.