#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Location
    UK
    Posts
    45
    Rep Power
    11

    Angry Notice another Post


    Hi,

    I post on other forums, and I get annoyed when I try to reply to someones message, and when I submit it, I find someone else has submited something before me.

    I'm making a message board and things myself in PHP using a MySQL database.
    Is there any way to notify the user that someone else has just posted a message. I want something to happen whilst the user is typing the message and someone else replied, not on a page refresh.

    Cheers
  2. #2
  3. No Profile Picture
    Clueless llama
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Feb 2001
    Location
    Lincoln, NE. USA
    Posts
    2,353
    Rep Power
    117
    I hope you don't take this wrong, but for someone that is making a message board from scratch, you seem to know very little about the request/response process of a web transaction. You may want to slow down on the coding and do some more reading first.

    A server cannot "push" information to a web client. Each request for a web page is a complete transaction and the server no longer has a connection to the client after it serves up the requested web page.

    I suggest finding an article on the http protocol and understand exactly what is happeneing when you click on a link for a web page.

    Here is some light reading
    http://www.dslab.tuwien.ac.at/Task_D...tion/http.html
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Location
    UK
    Posts
    45
    Rep Power
    11
    I do know how to code and am sure a can create a primative message board from scratch.
    I program with PHP a lot, and some VB, VB as simple exe's, PHP as you know is serverside, I'm not that good with java, I've only done a few scripts, but I know that it is client side, and was wondering if it coulld connect to a database or anything and ask the server every 10 secs or something, I don't know what java can and can't do.

    So I don't want the server to push something onto the client, I want the client to request it or something, but not with a page refresh.

    I was just getting annoyed with that kinda thing, and was hoping for a solution of some kind.

    My only other alternative is to have a tiny frame that keeps refrashing with php. But that's a naff and nasty way of doing it.
  6. #4
  7. No Profile Picture
    Clueless llama
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Feb 2001
    Location
    Lincoln, NE. USA
    Posts
    2,353
    Rep Power
    117
    Since java, like php, runs server side, then it has all the strengths and weaknesses php does in this respect. It cannot make the clients page do anything different than what php can. Perhaps you were thinking of Javascript? This is a different language entirely. You may want to post in the html/javascript forum.

IMN logo majestic logo threadwatch logo seochat tools logo