tweak to apply tenancy form php