Page 1 of 1

Chat Box in PHP

Posted: Sat Dec 19, 2009 7:09 pm
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

Re: Chat Box in PHP

Posted: Sat Dec 19, 2009 7:45 pm
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);

Re: Chat Box in PHP

Posted: Mon Dec 21, 2009 8:24 am
by cat_fich
I got it to work. Thanks