Jump to content

[SOLVED] Image Display Problem


Sinikka

Recommended Posts

There are two types of variations for the image I'm trying to get to display a dyed and non-dyed pet. Right now the coding will only pull the dyed pets and display them but passes over the non-dyed. I'm trying to get it to show both like it does on other pages throughout the site and it's the same coding but for some reason it won't work on this page. I was wondering if anyone had any suggestions or can see something that I'm not seeing as to why this isn't working correctly.

 

$query = mysql_query("SELECT * FROM user_pets2 WHERE owner = '$userid' AND adoption = '0' AND game = '$game' ORDER BY id ASC");

while ($array = mysql_fetch_array($query))
{
$id = $array[id];
$getPet = fetch("SELECT * FROM pets2 WHERE id = '$array[species]' AND game = '$game'");

$image[$id] = "pet_$getPet[id]";

if ($array[wearing] != 0)
{
	$findLook = fetch("SELECT * FROM pet_looks WHERE change_from = '$array[species]' AND item_name = '$array[wearing]'");

	if ($findLook[id])
	{
		$image[$id] = "pet2_$findLook[id]";

echo "
<p align=center>
<img src=$base_url/images/user_images/opg_$game/pets/$image[$id].gif>
<br><b>$array[name]</b> the $getPet[name]!</p><p align=center>Equipped Items:</p>";

Link to comment
https://forums.phpfreaks.com/topic/82804-solved-image-display-problem/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.