Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Questions and Supports (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=18)
-   -   How to show the name of adoptable in the profile page? (http://www.mysidiaadoptables.com/forum/showthread.php?t=1131)

SieghartZeke 10-10-2009 11:43 AM

How to show the name of adoptable in the profile page?
 
Someone know how to add in the profile page a feature that you can show the name of the other adoptable?

Xius 10-10-2009 02:48 PM

RE: How to show the name of adoptable in the profile page?
 
Something like this?
http://pokemonepiphany.com/pokepals/levelup.php?id=90

SieghartZeke 10-10-2009 02:59 PM

RE: How to show the name of adoptable in the profile page?
 
Yes...

Xius 10-10-2009 03:06 PM

RE: How to show the name of adoptable in the profile page?
 
Just use the ".$name." variable!

SieghartZeke 10-11-2009 05:18 AM

RE: How to show the name of adoptable in the profile page?
 
Ehm....where???

Xius 10-11-2009 10:05 AM

RE: How to show the name of adoptable in the profile page?
 
Wherever you want, you just have to pull it from the database first, and most pages already do that.

gabeki 10-11-2009 12:50 PM

RE: How to show the name of adoptable in the profile page?
 
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:

Xius 10-11-2009 01:05 PM

RE: How to show the name of adoptable in the profile page?
 
Yeah. xD

PHP Code:

              //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.

SieghartZeke 10-11-2009 02:26 PM

RE: How to show the name of adoptable in the profile page?
 
But...when i add $name i cant show the name of my chaarcter in myadopt page!

Xius 10-11-2009 02:39 PM

RE: How to show the name of adoptable in the profile page?
 
You have to include the whole thing -
PHP Code:

".$name." 


SieghartZeke 10-12-2009 09:39 AM

RE: How to show the name of adoptable in the profile page?
 
AHH....BUT I GET SOME DISASTER WHEN I ADD!I SO NOOB!


All times are GMT -5. The time now is 05:27 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.