GetDotted Domains

Viewing Thread:
"PHP problem"

The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.

Tue 08/01/02 at 03:15
Regular
Posts: 787
Ok, I am building my own message board in PHP and I have got a problem. I am currently designing a flat file system due to not having sql on here.

Ok I have got a text area but when ever any body press enters in the text area and submits a post. Because I have got it set up to read each line and output it to the screen before going 2 the next line. But currently if the user hits enter I get a new line added to the file when I don't require it so when it output the information. Instead of having one post on one line I could have one post over multiple lines of which I don't want to happen.
Thu 10/01/02 at 15:14
Posts: 0
nutter, I don't mind multiple lines posts. As long as before it gets put in to a file for access later on as the coding changes the \n to
and removes the \n coding so that all of the message gets puts in to one line. Because that way that I have got it set up is so that all information for one post/reply is stored on 1 line. then the next post on the next line and so on. But as I have got the \n problem it puts one post accross multiple lines in the file of which makes the computer think that it's different posts and not just 1 post. d:(


doc thanks, I will try that later on and see how it goes. d:)


But I am going 2 b giving the users the option of using HTML
Wed 09/01/02 at 19:14
Regular
"whoneedsatagline?"
Posts: 194
I agree - multiline posts are part and parcel of a message board. On mine, I use this to get rid of the awkward "\" in front of quotes, that forms always come back with, and also to replace newlines with
. Then the message is useable directly (unless you also want to use striptags to get rid of HTML and PHP tags).

$message = stripslashes(nl2br($message));

But then on my message board, I get to review/edit the unwashed input before it appears on the site ... and I've seen what can happen if you don't.
Wed 09/01/02 at 13:35
Regular
"Eff, you see, kay?"
Posts: 14,156
Hmm. This seems a little pointless to me. What's the point of having a message board when you can't have multi line posts?

I suggest fiddling about with the nl2br() function.
Tue 08/01/02 at 19:47
Posts: 0
Calculate the number of bytes of data in the input area and write that number to a new line in your text file before the actual content. Your parsing algorithm to display the posts should read the value of that number and then read /that many/ bytes from the file into a variable to format as a post before finding the next length in the same manner, and so on..

I love algorithms.
Tue 08/01/02 at 03:15
Posts: 0
Ok, I am building my own message board in PHP and I have got a problem. I am currently designing a flat file system due to not having sql on here.

Ok I have got a text area but when ever any body press enters in the text area and submits a post. Because I have got it set up to read each line and output it to the screen before going 2 the next line. But currently if the user hits enter I get a new line added to the file when I don't require it so when it output the information. Instead of having one post on one line I could have one post over multiple lines of which I don't want to happen.

Freeola & GetDotted are rated 5 Stars

Check out some of our customer reviews below:

Just a quick note to say thanks for a very good service ... in fact excellent service..
I am very happy with your customer service and speed and quality of my broadband connection .. keep up the good work . and a good new year to all of you at freeola.
Matthew Bradley
Many thanks!!
Registered my website with Freeola Sites on Tuesday. Now have full and comprehensive Google coverage for my site. Great stuff!!
John Shepherd

View More Reviews

Need some help? Give us a call on 01376 55 60 60

Go to Support Centre
Feedback Close Feedback

It appears you are using an old browser, as such, some parts of the Freeola and Getdotted site will not work as intended. Using the latest version of your browser, or another browser such as Google Chrome, Mozilla Firefox, or Opera will provide a better, safer browsing experience for you.