Updated script.php