Why do you make $now from time() and then use now() as well? You only need one of them :)