If I understand you correctly, you mean that if the person has stopped typing then the script would just send it away.
Well, first of all, PHP cannot accomplish this. PHP is serverside, so once it generates the HTML for you, it won't do anything else. You will need a clientside language like Javascript or something to tell it when to refresh.
Second, sending the message whenever thre user has stopped typing is a BAD idea. What if he just stopped to think of some more words and you cut him off in midsentance. It would be highly annoying.
IF you are tyring to get away from him clicking Submit buttons, you could bind the 'Enter' key or something of your choosing with JavaScript. It should be fairly easy.