Click to See Complete Forum and Search --> : for pyro's guestbook script...
xataku_nakusute
09-12-2003, 10:44 PM
hello, when searching for some particular help, i came across your guestbook script....i ran it on your site and when i added something to the guestbook, it took a while to submit...its prolly just my pc or something, but anyway, i was wondering 2 things.....
1) how can i manipulate it so the most recent additions appear on top?
and
2) how can i make this into a 'live' chat script where it doesnt have to reload the page every time it is submitted?(i beleive it is reloading because it is writing to a file probably...)
if you cant answer any of these, thanx anyways
1. You are going to have to write the file differently. Right now, it just appends to the file, but you are going to want to have it write with the newest additions at the top of the file, which means you'll have to read the current contents of the file into a variable, so you can write it back in after the new contents.
2. PHP really isn't ideal for a chat script -- you'd be better off with a Java applet.
xataku_nakusute
09-13-2003, 11:24 AM
alrighty, i did what ya said and it works fine, thanx!
and also...i thought a chat script would be ezr in php than in java....but thats prolly cuz i dont know much java....
thank you!(again)
xataku_nakusute
09-13-2003, 07:34 PM
is it possible for each entry to generate a new page with a completely random name??(sorry, this ones a bit odd)
Each entry in the guestbook or have each page that the guestbook is used on generate a new .txt file?
xataku_nakusute
09-14-2003, 10:26 PM
im thinking of the 1st one: each entry generating a new txt file....its for an idea of mine for a forum....cuz...otherwise i can only have one large thread instead having a new thread for each new posted question....but i guess id be better off with sql....right?
Yes, I would recommend MySQL for something like that.