Really? I can just put $name? O:
I did this:
PHP Code:
function getcurrentname($id){
include("config.php");
$query = "SELECT * FROM ".$prefix."owned_adoptables WHERE aid='$id'";
$result = mysql_query($query);
$num = mysql_numrows($result);
//Loop out code
$i=0;
while ($i < 1) {
$currentname=@mysql_result($result,$i,"name");
$i++;
}
return $currentname;
}
added that to function.php
and this to every page I wanted to show the name:
PHP Code:
$query = "SELECT * FROM ".$prefix."owned_adoptables WHERE owner = '".$user."'";
$aid=@mysql_result($result,$i,"aid");
$nameofpet = getcurrentname($aid);
and then I use $nameofpet, to show the name
I'm so dumb D: