Heres my script:
[FONT=Courier New]<body>
<?php
$shouts = fopen ( "shouts.txt" , "a+" );
fwrite ( $shouts , "<b>$POST[name]:</b> $POST[message]<br>\r\n" );
readfile ("shouts.txt");
?>
<form action="index.php" method="POST">
Name!<br>
<input type="text" name="name"><br>
Message!<br>
<input type="text" name="message"><br>
<input type="submit" value="Shout!">
</body>[/FONT]
My problem is that when the page is first loaded it writes a blank message to the text file (just a : colon). I understand why it does this, but how can I make the script so it only fwrites when a message has been entered? Or so it doesnt fwrite on first load...?
Any help appreciated, Thanks