How to show the name of adoptable in the profile page?

Forum
Last Post
Threads / Messages

SieghartZeke

Member
Member
Joined
Oct 4, 2009
Messages
149
Points
0
Age
29
Mysidian Dollar
6,621
Someone know how to add in the profile page a feature that you can show the name of the other adoptable?
 
Something like this?
http://pokemonepiphany.com/pokepals/levelup.php?id=90
 
Wherever you want, you just have to pull it from the database first, and most pages already do that.
 
Really? I can just put $name? O:

I did this:

PHP:
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:
	$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:
 
Yeah. xD

PHP:
              //The adoptable's ID
              $aid = @mysql_result($result, $i, "aid");
              $currentlevel = @mysql_result($result, $i, "currentlevel");
              $type = @mysql_result($result, $i, "type");
              $name = @mysql_result($result, $i, "name");

That's just an example of what it is in the myadopts.php page.
Just pull the name from the database.
 

Similar threads

Users who are viewing this thread

  • Forum Contains New Posts
  • Forum Contains No New Posts

Forum statistics

Threads
4,277
Messages
33,122
Members
1,602
Latest member
BerrieMilk
BETA

Latest Threads

Latest Posts

Top