Storing a timestamp

Good day,

I am working in a website with forms and buttons.
How can I store in a database the moment when a button is selected, like a timestamp?

For instance, a simple table with an ID and a Date variable, how can I store in this variable each moment a button is pressed?

Thanks a lot!!!

Run an INSERT or UPDATE command using the MySQL Function CURRENT_TIMESTAMP()