Made changes to the php script