rate.php code