In the first version,there is that method:the variables is:
$level=the level of the adopt
$mlevel=the level of the monster.
PHP Code:
$plusexp = currentexp + 20
//Set EXP in the database
$query = "UPDATE " .$prefix."owned_adoptables SET
currentexp='".$plusexp"' WHERE aid='".$id."'";
mysql_query($query);
This code needs updates,and it works when is a win.
EDIT:I found a random link script in PHP.