I've been working with this script, which is a chat box like the one on deviantart.com. Well, it doesn't use mysql but instead uses a simple text file.
Any way, in the stupid post.php file, it shows the following:
<?
if(empty($nick)) { echo "Enter Information"; exit(); }
// if the user did not enter a nick/msg say
$time = date("h.ia");
// time
$msg = stripslashes($msg);
// removes the \ after '
$message = "$nick : $time - $msg\n";
// how the messages will look
$fp = fopen ("messages.txt", "a");
fwrite ($fp, $message);
fclose ($fp);
// write the messge to messages.txt
header("Location: ../index.php");
// go back to the chatter box
?>
Now you see where the $nick : $time - $msg\n is? For some stupid reason, when you post to the chat box, it will post like this;
Nick : 11:20pm -
Bla bla bla. Nick : 11:19pm -
lol, stuff and stuff. MEMELL : 11:16pm -
This is me.
You get the idea? So instead of breaking after the message, it just addes the other users post to the same line. I've tried putting in break tags but it didn't work. Please Help. I'm pretty new to PHP, I need a break command!