PHP and JavaScript application