Added new logic to PHP file