I added this in the "Add Page", Before record added event.
//** Check if specific record exists ****
global $conn;
$strSQLExists = "select * from driver_trip_tbl
where drv_trp_date
='". toPHPTime($values["drv_trp_date"]) ."' AND drv_id
='". $values["drv_id"] ."'";
$rsExists = db_query($strSQLExists,$conn);
$data=db_fetch_array($rsExists);
if($data)
{
$message = "The Payroll Week already Exits for this driver."
return false;
}
else
{
return true;
}
//**
I keep getting "Parse error: syntax error, unexpected 'return' (T_RETURN) in driver_trip_tbl_events.php on line 179"
Can anyone see what's I'm missing? I'm probably going to kick myself once we figure this out.