curdate

i use expression

if($email == ‘’){

 print("Il cliente non ha una email!!!");

}

but can anyone write example , i want insert that if date of today is exipred of two day …etc…not sure but see function curdate()

Extracted from scriptcase date_diff snipet:

The macro sc_date_diff returns the difference in days between 2 dates, so you can use it to compare your due date with todays date.

Hope this helps

Regards


/**
 * Checking the difference between due date to current date.
 */

//getting the current date from php
$current_date = date('Y-m-d');
{amount_days} = sc_date_dif({field_due_date}, 'aaaa-mm-dd', $current_date, 'aaaa-mm-dd');

if({amount_days} > 0)
{
	//if amount is bigger then 0, means that current date is bigger then {field_due_date}
	//send an email to the user, this bill is overdue.
}
elseif({amount_days} == 0)
{
	//if amount is 0, means that current date igual {field_due_date}
	//send an email to the user, today is the payment day
}
elseif({amount_days} < 0)
{
	//if amount is less then 0, means that {field_due_date} is bigger then the current date
	//dont do nothing, the due date didnt pass yet
}

ok, i want use and insert the date of i create record in the field name {field_due_date} is right?bye thanks…