Php If Variable Not Defined Javascript Code