<script language="javascript">
var date = JAVASCRIPT DATE CODE HERE
var url = "logdate.php?date="+date;
open(url,'newwin','toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=0,width=1,height=1');
</script>
(you need to delete the spaces in the open code, its a wordwrap thing on the forum)
Then in logdate.php you put:
PHP Code:
<?php
//get the date from the ?date= string
$date = $_GET['date'];
//connect to database here
//insert date
mysql_query("INSERT INTO tablename (date) VALUES('$date')");
this is way of doing it, or you can use XMLHttpRequest to send the data in the background without the need for a popup window.
here is a tutorial I wrote not long ago about it: http://www.phpsimplicity.com/tips.php?id=16
__________________ PHPSimplicity
We don't need a reason to help people - Zidane [FF9]