Have an account? Sign in
Login  Register  Facebook
php and mysql time problem
Hi,
Friend I have table in mysql filed with date(dd-mm-yyyy)
this is in form page ,i want date of my sever auto save (i mean check server date and save it).
I want to know in which date u have submit ur form.

Thanks
Started: September 18, 2011 Latest Activity: September 18, 2011 php
1 Answer
if your data filed in your table is date like that 000-000-00 or dd-mm-yyyy
you have to use CURDATE() in your mysql query
if your data filed in your table is int(10) in example you have to use the php time() function like that:
insert into `table_name` set `time` = \'\".time().\"\'
and you have to use date() function also

Posted: MacOS
In: September 18, 2011

Your Answer

xDo you want to answer this question? Please login or create an account to post your answer