Code practice in js and php.