Added php variables.
Added if conditions for parameters