This Message Forum is no longer in use

Please use the new Bravenet Help Forums FOUND HERE

General Forum
This Forum is Locked
Author
Comment
PHP function not working

Hi

I've just started learning PHP.
I have made a javascript/ajax/php chatroom, from modding some open source code that I found.
The chatroom worked, but then I wanted to remove the ability to post html code into it. I did this by replacing all < and > with [ and ]
When I did this the room is still working as good as it ever was, so I decided to take it a step further and try to implement a version of bb code.
I added a function to the php file to search for bb tags and replace them with html.
When I did this the chatroom stopped working unless I commented out not just the function calls, but the function itself.
My HTML file ( saved as a text file) is http://scutterman.com/bravenet/index.htm.txt
and my php file (saved as a text file) is http://scutterman.com/bravenet/data.txt

I was just wondering if anyone could see any errors with the function or anything. I commented both files to show what I am trying to do.

I hope all of that makes sense...

also, the chatroom seems to be very laggy, is there anything in the code that could be causing that, or is it probably just the hosters servers?

TIA
~~Scutterman~~