Sinikka Posted December 22, 2007 Share Posted December 22, 2007 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>"; Quote Link to comment https://forums.phpfreaks.com/topic/82804-solved-image-display-problem/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.