FaDev Posted January 24, 2011 Share Posted January 24, 2011 I got two lists on a website. One list includes bunch of items and simple info. Another list includes pictures of those items and detailed information. I would like to set it up that way when users clicks on item from list #1 it would automatically jump to an item with the picture and detailed info on a second list. Link to comment https://forums.phpfreaks.com/topic/225564-php-linking-question/ Share on other sites More sharing options...
Maq Posted January 24, 2011 Share Posted January 24, 2011 What exactly are these lists? HTML lists, text file lists, array lists, what? What have you done so far? Can we see your code? Do you have a question, you haven't asked one yet. Link to comment https://forums.phpfreaks.com/topic/225564-php-linking-question/#findComment-1164733 Share on other sites More sharing options...
FaDev Posted January 24, 2011 Author Share Posted January 24, 2011 Here you go list #1 <div class="div_title">Complete Weapons Listing - click on weapon name for details:</div> <div class="spacer"></div> <div class="tab_pad"> <table cellpadding="0" cellspacing="0" class="sets" width="550"> <tr> <td class="title" rowspan="2">Weapon Title</td> <td class="title" colspan="6">Can be equiped by:</td> </tr> <tr> <td class="title">Knight</td> <td class="title">Wizard</td> <td class="title">Elf</td> <td class="title">Gladiator</td> <td class="title">Lord</td> <td class="title">Summoner</td> <td class="title">Rage</td> </tr> <? $set_query = mssql_query("SELECT id, Title, knight, wizard, elf, gladiator, lord, summoner, rage, type FROM weapons_data ORDER by Title asc"); for($i = 0; $i < mssql_num_rows($set_query);++$i) { $set_row = mssql_fetch_row($set_query); if ($set_row[2] == 1) $set_row[2] = "Yes"; else $set_row[2] = "-"; if ($set_row[3] == 1) $set_row[3] = "Yes"; else $set_row[3] = "-"; if ($set_row[4] == 1) $set_row[4] = "Yes"; else $set_row[4] = "-"; if ($set_row[5] == 1) $set_row[5] = "Yes"; else $set_row[5] = "-"; if ($set_row[6] == 1) $set_row[6] = "Yes"; else $set_row[6] = "-"; if ($set_row[7] == 1) $set_row[7] = "Yes"; else $set_row[7] = "-"; if ($set_row[8] == 1) $set_row[8] = "Yes"; else $set_row[8] = "-"; ?><tr> <td width=300 align=left><a href="?page_id=view_single_weapon&weapon=<? echo $set_row[0]; ?>" alt="<? echo $set_row[1]; ?>"><? echo $set_row[1]; ?></a></td> <td align=center><? echo $set_row[2]; ?></td> <td align=center><? echo $set_row[3]; ?></td> <td align=center><? echo $set_row[4]; ?></td> <td align=center><? echo $set_row[5]; ?></td> <td align=center><? echo $set_row[6]; ?></td> <td align=center><? echo $set_row[7]; ?></td> <td align=center><? echo $set_row[8]; ?></td> </tr><? } ?> </table></div> And list #2 <? if (isweapon($_GET['weapon'])) { $query = mssql_query("SELECT id, Title, mindmg, maxdmg, minexcdmg, maxexcdmg, type FROM weapons_data WHERE id = ".$_GET['weapon']." ORDER by mindmg asc"); $set_row = mssql_fetch_row($query); $imagename = str_replace(" ", "_", $set_row[1]); $imagename = strtolower($imagename); ?> <div class="div_title" align=center><? echo $set_row[1]; ?>:</div> <div class="spacer"></div> <table cellpadding="0" cellspacing="0" class="sets_table" width="400" align=center> <tr><td rowspan="17" width="124" ><img src="/guides/sets/images/<? echo $imagename; ?>.jpg" alt="<? echo $set_row[1]; ?> Set" width="124" height="200" /></td> <td>Level</td> <td>Minimum Damage</td> <td>Maximum Damage</td> <td>Minimum Exc Damage</td> <td>Maximum Exc Damage</td> </tr> <tr> <td>+0</td> <td><? echo $set_row[2]; ?></td> <td><? echo $set_row[3]; ?></td> <td><? echo $set_row[4]; ?></td> <td><? echo $set_row[5]; ?></td> </tr> <tr> <td>+1</td> <td><? echo $set_row[2]; ?></td> <td><? echo $set_row[3]; ?></td> <td><? echo $set_row[4]; ?></td> <td><? echo $set_row[5]; ?></td> </tr> <tr> <td>+2 </td> <td><? echo $set_row[2]; ?></td> <td><? echo $set_row[3]; ?></td> <td><? echo $set_row[4]; ?></td> <td><? echo $set_row[5]; ?></td> </tr> <tr> <td>+3 </td> <td><? echo $set_row[2]; ?></td> <td><? echo $set_row[3]; ?></td> <td><? echo $set_row[4]; ?></td> <td><? echo $set_row[5]; ?></td> </tr> <tr> <td>+4 </td> <td><? echo $set_row[2]; ?></td> <td><? echo $set_row[3]; ?></td> <td><? echo $set_row[4]; ?></td> <td><? echo $set_row[5]; ?></td> </tr> <tr> <td>+5 </td> <td><? echo $set_row[2]; ?></td> <td><? echo $set_row[3]; ?></td> <td><? echo $set_row[4]; ?></td> <td><? echo $set_row[5]; ?></td> </tr> <tr> <td>+6 </td> <td><? echo $set_row[2]; ?></td> <td><? echo $set_row[3]; ?></td> <td><? echo $set_row[4]; ?></td> <td><? echo $set_row[5]; ?></td> </tr> <tr> <td>+7 </td> <td><? echo $set_row[2]; ?></td> <td><? echo $set_row[3]; ?></td> <td><? echo $set_row[4]; ?></td> <td><? echo $set_row[5]; ?></td> </tr> <tr> <td>+8 </td> <td><? echo $set_row[2]; ?></td> <td><? echo $set_row[3]; ?></td> <td><? echo $set_row[4]; ?></td> <td><? echo $set_row[5]; ?></td> </tr> <tr> <td>+9 </td> <td><? echo $set_row[2]; ?></td> <td><? echo $set_row[3]; ?></td> <td><? echo $set_row[4]; ?></td> <td><? echo $set_row[5]; ?></td> </tr> <tr> <td>+10 </td> <td><? echo $set_row[2]; ?></td> <td><? echo $set_row[3]; ?></td> <td><? echo $set_row[4]; ?></td> <td><? echo $set_row[5]; ?></td> </tr> <tr> <td>+11 </td> <td><? echo $set_row[2]; ?></td> <td><? echo $set_row[3]; ?></td> <td><? echo $set_row[4]; ?></td> <td><? echo $set_row[5]; ?></td> </tr> <tr> <td>+12 </td> <td><? echo $set_row[2]; ?></td> <td><? echo $set_row[3]; ?></td> <td><? echo $set_row[4]; ?></td> <td><? echo $set_row[5]; ?></td> </tr> <tr> <td>+13 </td> <td><? echo $set_row[2]; ?></td> <td><? echo $set_row[3]; ?></td> <td><? echo $set_row[4]; ?></td> <td><? echo $set_row[5]; ?></td> </tr> <tr> <td>+14 </td> <td><? echo $set_row[2]; ?></td> <td><? echo $set_row[3]; ?></td> <td><? echo $set_row[4]; ?></td> <td><? echo $set_row[5]; ?></td> </tr> <tr> <td>+15 </td> <td><? echo $set_row[2]; ?></td> <td><? echo $set_row[3]; ?></td> <td><? echo $set_row[4]; ?></td> <td><? echo $set_row[5]; ?></td> </tr> </table><BR><BR> <a href="/index.php?page_id=reg_set_list">Go back to list</a> <? } ?> When person clicks on item from list #1 I need it to fetch that item form list #2 is that possible. If you see any other issues wit code I would really appreciate if u let me know. Link to comment https://forums.phpfreaks.com/topic/225564-php-linking-question/#findComment-1164740 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.