I am currently using:
[indent]PHPRunner 4.1 (Build 320)
MySQL 5.0.27-community-nt
Apache 2.2.4 (Win32) PHP 5.2.4[/indent]
I have sucessfully created a "Before Record Added" event on an Add record page which determines a date in the future one month in advance of the current date. I assign that date to a SESSION variable.
[codebox]// determine a date in the future one month from now
$rs = db_query( "select DATE_ADD(now(),INTERVAL 1 MONTH) as future_date",$conn);
$data = db_fetch_array($rs);
$_SESSION['one_month_from_now'] = $data['future_date'];
[/codebox]
I then use that SESSION variable as the default for a date field visible on an Add record form. When I enter the Add record page, the date field is populated with a date one month in the future, and when I click on the date picker icon next the the field, it defaults to that same date.
This method works fine on my development platform (my PC running XP sp2 running MySQL/Apache/PHP) and I get the expected results when using the date field (and date picker) on my Add record page.
However, when I transfer the web site (I ZIP the website files as built by PHPRunner and copy them over to the other server) to a different server (Window 2003 sp1 running the same versions of MySQL/Apache/PHP as my PC), the date field on my Add record page does not present me with the expected default date of one month in the future. The date field is empty when I enter the Add record page,and the date picker for the field only presents the current date.
I am not sure why this functionality would work on my development PC, but when transferred, would not work on the other server. Everything else about the site works great. I confirmed that the event code is present in the appropriate /include/..events.php file.
Any ideas?