PHP Chatrooms

Ok, hello everyone Iā€™m a beginner in php and MySQL and I am trying to create a chat room :smiley:
I have the page automatically reloading every 12 seconds, to check for received messages
If the user has not submitted a message within 12 seconds their input disappears :ā€™(
Is it possible to check for messages then reload to receive them, without deleting un submitted messages.
Is there an easier way to do this :o
Please help, I am a true beginner.

You could of course make this work, but the real solution is to not redirect/refresh with PHP: You should use ajax (Jquery) to query the server side for updates, and if there are updates write them to the chat area.

Sponsor our Newsletter | Privacy Policy | Terms of Service