The $to_date and $from_date variables were incorrectly referanced in the html as form_to_date and form_from_date.