here i used like this date('Y-m-d h:i:s A') as well as date('l dS \of F Y h:i:s A')
but both doesn't shows the current pc time
is there anyother way to get pc time??????????
hi
here i used like this
$a='<script type="text/javascript"> document.write( Date()) </script>';
echo "$a";
now its working.
but i want to store this variable into mysql database.
In what data type????should i store in database???????
You would need to auto populate a forum with the date object then have it auto submit on page load. Please see the javascript form for additional help on this.
hi
here i used like this
$a='<script type="text/javascript"> document.write( Date()) </script>';
echo "$a";
now its working.
but i want to store this variable into mysql database.
In what data type????should i store in database???????
Hi Hemashiki,
You haven't given us much info to go on. You said you wanted to store the users current time in the database, then ask if you should. That all depends on what your application is supposed to do. Are you requirements that your database store the users current time? If so, then yes you should store it. MySQL has a few different date / time datatypes. Check This Out
hey hi....!try printing this ' ".date('y-m-d h:m:s')."' this should give you current system time
No it won't. We went over that already. This gives the server time, not the user's.
Anyway, there is really no reason to have the user's time. Hell, it's probably the wrong time anyway. :P
You should only need to use your server's time (and make sure your host keeps their server time correct).
Comment