changed js to php