here's the deal. i have a bunch of queries that return results, and the results are displayed through loops. like:
<br>
Total Bands Found: '.$num_results.'<br>
With favorite band: '.$favPlay.'<br>
</span>';
echo '<br><br><center>';
echo '<table width="600" border="0" cellpadding="0" cellspacing="0">
<td width="60"></td>
<td width="100"><u>Band Name</u></td>
<td width="90"></td>
<td width="175"><u>From</u></td>
<td width="75"></td>
<td width="100"><u>ID</u></td>
</table>';
$i=1;
while ($row = mysql_fetch_assoc($result))
{
echo '<table width="100%" cellspacing="0" cellpadding="0" border="0">
<td width="100"></td><td>
<td align="left" width="150">'.($i++).'. ';
echo stripslashes($row['name']).'</td>';
echo '<td align = "left" width="100">';
echo ' - ';
echo stripslashes($row['origin']).'</td>';
echo '<td align = "left" width="100">';
echo ' :: ';
echo '<a href="bMoreInfo.php" class="contact">More Info</a></td>';
echo '<td align = "left" width="40">';
echo stripslashes($row['ID']).'</td>';
echo '<td width="100"></td>';
echo '</tr><br>';
}
which work great. however, if want to display more information on a particular item within the list, how can I do that since all info displayed is by variable?
If they click on 'more info' I want the user to be able to go to a page that has more info about that specific band. However, I want to loop through and pick up all the info about only that band and display it.
Each band has a unique ID number...this crappy loop is along the lines of what I'm thinking, but it clearly is lacking. Any help would be soooooo appreciated. Thank you!!!
i = 1
if ($ID == i)
{exit()};
else (i++, $ID == i)
{
while (ID == x)
echo '
<br>
<center>
<table width="400" cellpadding="0" cellspacing="0" border="0">
<td valign="top">Name:</td>
<td align="left" width="200">'.$name.'</td></table>
<table width="400" cellpadding="0" cellspacing="0" border="0">
<td valign="top">Site Link:</td>
<td align="left" width="200">'.$siteLink.'</td></table>
<table width="400" cellpadding="0" cellspacing="0" border="0">
<td valign="top">Year Formed:</td>
<td align="left" width="200">'.$whenFormed.'</td></table>
<table width="400" cellpadding="0" cellspacing="0" border="0">
<td valign="top">Where Formed:</td>
<td align="left" width="200">'.$origin.'</td></table>
<table width="400" cellpadding="0" cellspacing="0" border="0">
<td valign="top"># of Members:</td>
<td align="left" width="200">'.$members.'</td></table>
<table width="400" cellpadding="0" cellspacing="0" border="0">
<td valign="top">Member Names:</td>
<td align="left" width="200">'.$memberName.'</td></table>
<table width="400" cellpadding="0" cellspacing="0" border="0">
<td valign="top">Genre:</td>
<td align="left" width="200">'.$genre.'</td></table>
<table width="400" cellpadding="0" cellspacing="0" border="0">
<td valign="top">Draw:</td>
<td align="left" width="200">'.$draw.'</td></table>
<table width="400" cellpadding="0" cellspacing="0" border="0">
<td valign="top">Where Played:</td>
<td align="left" width="200">'.$wherePlayed.'</td></table>
<table width="400" cellpadding="0" cellspacing="0" border="0">
<td valign="top">Bands played with(loc):</td>
<td align="left" width="200">'.$whoWithLoc.'</td></table>
<table width="400" cellpadding="0" cellspacing="0" border="0">
<td valign="top">Bands played with(nat\'l):</td>
<td align="left" width="200">'.$whoWithNat.'</td></table>
<table width="400" cellpadding="0" cellspacing="0" border="0">
<td valign="top">On a Label:</td>
<td align="left" width="200">'.$label.'</td></table>
<table width="400" cellpadding="0" cellspacing="0" border="0">
<td valign="top">Label Name:</td>
<td align="left" width="200">'.$labelName.'</td></table>
<table width="400" cellpadding="0" cellspacing="0" border="0">
<td valign="top">Manager:</td>
<td align="left" width="200">'.$manager.'</td></table>
<table width="400" cellpadding="0" cellspacing="0" border="0">
<td valign="top">Manager Name:</td>
<td align="left" width="200">'.$managerName.'</td></table>
<table width="400" cellpadding="0" cellspacing="0" border="0">
<td valign="top">Want Promotion:</td>
<td align="left" width="200">'.$wouldPay.'</td></table>
<table width="400" cellpadding="0" cellspacing="0" border="0">
<td valign="top">Would Pay:</td>
<td align="left" width="200">'.$howMuch.'</td></table>
<table width="400" cellpadding="0" cellspacing="0" border="0">
<td valign="top">Fav Venues:</td>
<td align="left" width="200">'.$favVenue.'</td></table>
<table width="400" cellpadding="0" cellspacing="0" border="0">
<td valign="top">Fav Bands:</td>
<td align="left" width="200">'.$favPlay.'</td></table>
<table width="400" cellpadding="0" cellspacing="0" border="0">
<td valign="top">Fav Promoter:</td>
<td align="left" width="200">'.$favBooker.'</td></table>
<table width="400" cellpadding="0" cellspacing="0" border="0">
<td valign="top">Fav Promo Co:</td>
<td align="left" width="200">'.$favPromoCo.'</td></table>
<table width="400" cellpadding="0" cellspacing="0" border="0">
<td valign="top">Records Sold:</td>
<td align="left" width="200">'.$sold.'</td></table>
<table width="400" cellpadding="0" cellspacing="0" border="0">
<td valign="top">Discography:</td>
<td align="left" width="200">'.$disco.'</td></table>
<br><br><br>
</center>';