Basically all I want is for users to come into the site, type in their message and name, and the results should be displayed in the same page and when another user comes in again, the results from previous user should be there and anything that comes up should just be added to the list.
currently I have:
<form id="form1" name="form1" method="post" action="">
<label>Please type in a message
<input type="text" name="msg" id="msg" />
</label>
<label>and your name
<input type="text" name="pin" id="name" />
</label>
<p>
<label>Submit
<input type="submit" name="submit" id="submit" value="Submit" />
</label>
</p>
</form>
<?php
$msg = $_POST[msg];
$name = $_POST[name];
?>
<br />
<?php echo "$msg"?>
<?php echo "$name"?>
but when another record is type in, the previous one is lost…
thanks in advance
This should do what you want. It loads previous posts from
posts.txt, adds the current one, displays the posts and saves it. You’ll need to make sureposts.txtexists and has correct permissions.