how do i get the current date/time when i click a button? i manage to retrieve the value of current date/time in 2 separate hidden fields when the page loads.. but i want to retrieve the actual date/time only when i click the button. is it possible? i think it is, but how? after that, i want to store into the database.

thanks.

use javascript or on button clicked refresh page. i would suggest the javascript route.

do u have any link for those javascript?

:cool: thanks for the help.. i mng to get the current time.. n here, im going to share with u guys..

my solution is neither using javascript nor refresh page.. it is that:

i get the current time only when i want to insert record into the db. :p
hence, i call time() when i insert the values for the timeSent column.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.