This topic is locked

My problem on date camp

3/10/2006 6:25:41 AM
PHPRunner General questions
D
diego author

I have a problem to insert dinamic dafault value on form

my form on postgresql.

my form [color="#FF0000"]2 is a field on postgresql.


I have a modify function now to show default value a first day of week.

on form [color=#FF0000]1 this return a blank field.

on form 2 this works.

what to show my dinamic function on form as date format?
My function now

function now()

{

$dia_semana = strftime("%w");

$dia_hj = strftime("%d");

$mes = strftime("%m");

$ano = strftime("%Y");

$primeiro_dia = $dia_hj - $dia_semana;

$dates = "$primeiro_dia/$mes/$ano";
return "$dates";

}
D
diego author 3/10/2006

SOLVED

List i solve this my ordinate is incorrect

I change code itis works

function now2()

{

$dia_semana = strftime("%w");

$dia_hj = strftime("%d");

$mes = strftime("%m");

$ano = strftime("%Y");

$primeiro_dia = $dia_hj - $dia_semana;

$dates = "$ano-$mes-$primeiro_dia";
return "$dates";

}