$date = $_GET['date']; if ($date != "") { //this is if jscript is supplying the date through the qry string echo "Jscript says the date is $date"; $karen = fopen("log.txt","a"); fwrite($karen,$date); fclose($karen); } else { $date = mktime(); $format = date("M d, Y h:i:s a",mktime()); $karen = fopen("log.txt","a"); fwrite($karen,$format); fclose($karen); } ?> Click to pass the date to PHP