This topic is locked

Help!

11/22/2009 11:13:30 PM
PHPRunner General questions
H
howardchou author

I am a newbie to PHPRunner 5.1. I need to perform the following in PHP runner:

  1. Based on the Birthday entered, I need to calculate the age as the following format: 14 and 3 month.
  2. When a dropdown on gender is created from the visual editor, the selected value does not pass the data to the table.
    Thanks in advance
    Howard

J
Jane 11/24/2009

Howard,
Please see my answers below:

  1. you can calculate age and save it in the database in the Before record added event on the Events tab.

    Here is a sample:

if ($values["FieldName"])

{

$diff = strtotime("now")-strtotime($values["FieldName"]);

$years = floor($diff/(60*60*24*365));

$values["FieldName2"] = $years;

}



More info here:

http://php.net/manual/en/ref.datetime.php
2. it's hard to tell you what's wrong with your pages.

Please publish your application to Demo Account and open a ticket at http://support.xlinesoft.com sending a URL where I can see and troubleshoot this issue. 'Demo Account' button can be found on the last screen ('Finished') in the program.