Chat Box in PHP

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
cat_fich
Forum Newbie
Posts: 9
Joined: Thu Dec 17, 2009 3:55 pm

Chat Box in PHP

Post by cat_fich »

I was thinking in doing a Chat Box in PHP. For that I would use a form with two fields, Nick and Message, then I would store the data in a DB and show them.
I have already made the code for this. In the Chat Boxes I saw there the tima/date always appears in front of the messages.
I don't need the time but I'd want to send to a database field the date of the moment when the user clicks the subtim button for orientation purposes.
Can someone give me an hint on how to do this?
Thanks
User avatar
daedalus__
DevNet Resident
Posts: 1925
Joined: Thu Feb 09, 2006 4:52 pm

Re: Chat Box in PHP

Post by daedalus__ »

http://dev.mysql.com/doc/refman/5.0/en/timestamp.html wrote:CREATE TABLE t (
ts1 TIMESTAMP DEFAULT 0,
ts2 TIMESTAMP DEFAULT CURRENT_TIMESTAMP
ON UPDATE CURRENT_TIMESTAMP);
cat_fich
Forum Newbie
Posts: 9
Joined: Thu Dec 17, 2009 3:55 pm

Re: Chat Box in PHP

Post by cat_fich »

I got it to work. Thanks
Post Reply