tested php and got working

changed the main.js file to use the php.