<?php // include necessary class require_once "ax710.class.php"; // check on post-variable if (is_string($_POST['artist']) && strlen($_POST['artist']) > 0) { $artist = $_POST['artist']; } else { die("Wrong parameter..."); } // get position $position = ax710::getScoreAJAX($artist); // return string echo '<p class="t_' . $position . '">' . $artist . '</p>' . "\n";