On 11/2/07, Dan Shirah <[EMAIL PROTECTED]> wrote: > > Okay, so instead I should probably use: > > if($due_date != "") > $insert2.=", due_date='$due_date'"; > > Instead of using empty() >
using emtpy is fine; just store the results of trim in a temporary variable: $trimmed = trim($due_date); if(!empty($trimmed)) { $insert2 .= ", due_date='$due_date'"; } -nathan