Two things I should point out:
1. There's no need to create two objects for the current date. When you create a new Date object, it's automatically set to today's date:
2. You should validate the actual string for the "from" and "to" dates that they are valid dates, e.g. with regular expressions.
PS. please use code tags around your code: [code]like this[/code] It makes it a lot easier to read.