javascript/php solutions