<?php $mysqltime = date('Y-m-d H:i:s'); // this will provide you current data ?>
$sample1 = "insert into table (id,date) value(1,'".date("Y-m-d H:i:s")."')";
$sample2 = "insert into user (name,date,created_by) value('perasuah negara', now(), 1)"
$update_query = "UPDATE db.tablename SET insert_time=now() WHERE username='" .$somename . "'";