GetDotted Domains

Viewing Thread:
"php news"

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.

Sun 26/05/02 at 14:00
Regular
Posts: 787
I've got a php news script on my site, it works well, except for the fact that the new news is entered at the bottom of the page and the old news stays at the top.
So, unless I edit the news data to turn the tables around everytime I enter some news it will stay the same.
Is there a script I can enter to flip the tables around or so that next time I enter some news in it enters it into the top instead of the bottom? thanks.

news script: http://membres.lycos.fr/enterthefog/update/news.php
Sun 26/05/02 at 19:26
Regular
"It goes so quickly"
Posts: 4,083
Cheers for the tips.

I know about all those, though the begining when i was learning I did it that way, and its just stuck, so I go along with it :o)

But it was a basic chat thing just to see if I could do it, I would like to extend it to be a great one.

Oh, and mind if I ask do you know how to get an IP address??? I thought it was $REMOTE_ADDR, but doesn't seem to work.
Sun 26/05/02 at 19:23
Posts: 0
Well it works fine. Your script looks OK, except for one small thing. In the file 'chat.php', you have re-used the variable $fp. although there is nothing wrong with this since you don't need it's old value, I would recommend against it - just for good practice.

Similarly, when you want to print data into HTML, you can do the following:

At the moment you have:
You can replace this with:

(btw, u do not need to end a line with a semicolon (;) if it is immediately before the closing php tag (?>) )
Sun 26/05/02 at 19:15
Regular
"It goes so quickly"
Posts: 4,083
Just sent it :o)

So you can have a look at the code which wites the data to the file. Its the 'chat.php' file that does the writting
Sun 26/05/02 at 19:11
Regular
"IT'S ALIVE!!"
Posts: 4,741
Hello, sorry about that, popped out for a sec,
[email protected] if you still want it...although you've posted the script :D
Sun 26/05/02 at 18:54
Regular
"It goes so quickly"
Posts: 4,083
Nimco, can you go to that addy and test it for me too???


You want my .zip file??
Sun 26/05/02 at 18:50
Posts: 0
cjh wrote:
> Just don't get it, that should have worked...hhhhmmmmm.
> You got an E-mail addy???
>
> I've got something that I made which did this, so if I sent it you
> could have a peek and see if I went wrong somewhere

[email protected]
Sun 26/05/02 at 18:43
Regular
"It goes so quickly"
Posts: 4,083
http://62.190.204.203/Chat/index.php and have a quick go at it. It uses the same method of adding new data (chat text) to the top of the file
Sun 26/05/02 at 18:41
Regular
"It goes so quickly"
Posts: 4,083
Just don't get it, that should have worked...hhhhmmmmm.
You got an E-mail addy???

I've got something that I made which did this, so if I sent it you could have a peek and see if I went wrong somewhere
Sun 26/05/02 at 18:21
Regular
"IT'S ALIVE!!"
Posts: 4,741
It all works, it's just the new news would be better at the top instead of having to scroll down to see whats new. Thanks all the same :D much appreciated.
Sun 26/05/02 at 18:02
Regular
"It goes so quickly"
Posts: 4,083
The thing I had was suppose to check for a file, and create it if it doesn't exist, or read it and copy the data to a Variable if it did.

Not work then/???/

Freeola & GetDotted are rated 5 Stars

Check out some of our customer reviews below:

Great services and friendly support
I have been a subscriber to your service for more than 9 yrs. I have got at least 12 other people to sign up to Freeola. This is due to the great services offered and the responsive friendly support.
LOVE it....
You have made it so easy to build & host a website!!!
Gemma

View More Reviews

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

Go to Support Centre

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.