Hi --
I have a list generated, and want to allow the user to click a "next" button, instead of returning to the search page, re-entering their criteria and then going to the next one on the list, allow them to skip that step.
Here's the code I have for what they see when they click on an item in the list, from this page I want them to be able to go directly to the next item on the list. that was long-winded.... thank you!!!
<?php
include 'head.asp';
include 'misc.inc';
$ID = $HTTP_POST_VARS['ID'];
$name = $HTTP_POST_VARS['name'];
$siteLink = $HTTP_POST_VARS['siteLink'];
$email = $HTTP_POST_VARS['email'];
/ connect to server(mysql) with pconnect for persistent
connection, not to close then reconnect /
mysql_pconnect("$host","$user","$password")
or die ("Couldn't connect to the server.");
/ connect to db (seattlebands) /
mysql_select_db("seattlebands")
or die ("Couldn't connect to the database.");
/ query /
$query = "SELECT *
FROM bands
WHERE ID='".$_GET['id']."'";
$result = mysql_query($query)
or die (mysql_error());
$num_results = mysql_num_rows($result);
$row = mysql_fetch_assoc($result);
// spit out all the shit here
echo '<center>';
echo '<br>';
echo stripslashes($row['name']);
echo '<br><br>';
echo '<table width="400" cellpadding="0" cellspacing="0" border="0">
<td valign="top">Name:</td>
<td align="left" width="200">';
echo stripslashes($row['name']);
echo '</td></table>';
echo '<center>';
echo '<table width="400" cellpadding="0" cellspacing="0" border="0">
<td valign="top">Contact email:</td>
<td align="left" width="200">';
echo '<a href="mailto:'.$row['email'].'" class="lnav" target="_new">';
echo stripslashes($row['email']);
echo '</a>';
echo '</td></table>';
echo '<center>';
echo '<table width="400" cellpadding="0" cellspacing="0" border="0">
<td valign="top">Web:</td>
<td align="left" width="200">';
echo '<a href="http://'.$row['siteLink'].'" class="lnav" target="_new">';
echo 'Click Here';
echo '</a>';
echo '</td></table>';
echo '<center>';
echo '<table width="400" cellpadding="0" cellspacing="0" border="0">
<td valign="top">When Formed:</td>
<td align="left" width="200">';
echo stripslashes($row['whenFormed']);
echo '</td></table>';
echo '<center>';
echo '<table width="400" cellpadding="0" cellspacing="0" border="0">
<td valign="top">Where Formed:</td>
<td align="left" width="200">';
echo stripslashes($row['origin']);
echo '</td></table>';
echo '<center>';
echo '<table width="400" cellpadding="0" cellspacing="0" border="0">
<td valign="top"># of Members:</td>
<td align="left" width="200">';
echo stripslashes($row['members']);
echo '</td></table>';
echo '<center>';
echo '<table width="400" cellpadding="0" cellspacing="0" border="0">
<td valign="top">Member Names:</td>
<td align="left" width="200">';
echo stripslashes($row['memberName']);
echo '</td></table>';
echo '<center>';
echo '<table width="400" cellpadding="0" cellspacing="0" border="0">
<td valign="top">Genre:</td>
<td align="left" width="200">';
echo stripslashes($row['genre']);
echo '</td></table>';
echo '<center>';
echo '<table width="400" cellpadding="0" cellspacing="0" border="0">
<td valign="top">Draw:</td>
<td align="left" width="200">';
echo stripslashes($row['draw']);
echo '</td></table>';
echo '<center>';
echo '<table width="400" cellpadding="0" cellspacing="0" border="0">
<td valign="top">Where played:</td>
<td align="left" width="200">';
echo stripslashes($row['wherePlayed']);
echo '</td></table>';
echo '<center>';
echo '<table width="400" cellpadding="0" cellspacing="0" border="0">
<td valign="top">Bands played with Local:</td>
<td align="left" width="200">';
echo stripslashes($row['whoWithLoc']);
echo '</td></table>';
echo '<center>';
echo '<table width="400" cellpadding="0" cellspacing="0" border="0">
<td valign="top">Bands played with Nat\'l:</td>
<td align="left" width="200">';
echo stripslashes($row['whoWithNat']);
echo '</td></table>';
echo '<center>';
echo '<table width="400" cellpadding="0" cellspacing="0" border="0">
<td valign="top">On a label:</td>
<td align="left" width="200">';
echo stripslashes($row['label']);
echo '</td></table>';
echo '<center>';
echo '<table width="400" cellpadding="0" cellspacing="0" border="0">
<td valign="top">Label Name:</td>
<td align="left" width="200">';
echo stripslashes($row['labelName']);
echo '</td></table>';
echo '<center>';
echo '<table width="400" cellpadding="0" cellspacing="0" border="0">
<td valign="top">Have manager:</td>
<td align="left" width="200">';
echo stripslashes($row['manager']);
echo '</td></table>';
echo '<center>';
echo '<table width="400" cellpadding="0" cellspacing="0" border="0">
<td valign="top">Manager Name:</td>
<td align="left" width="200">';
echo stripslashes($row['managerName']);
echo '</td></table>';
echo '<center>';
echo '<table width="400" cellpadding="0" cellspacing="0" border="0">
<td valign="top">Want promotion:</td>
<td align="left" width="200">';
echo stripslashes($row['wouldPay']);
echo '</td></table>';
echo '<center>';
echo '<table width="400" cellpadding="0" cellspacing="0" border="0">
<td valign="top">How much paid for promotion:</td>
<td align="left" width="200">';
echo stripslashes($row['howMuch']);
echo '</td></table>';
echo '<center>';
echo '<table width="400" cellpadding="0" cellspacing="0" border="0">
<td valign="top">Fav Venues to play:</td>
<td align="left" width="200">';
echo stripslashes($row['favVenue']);
echo '</td></table>';
echo '<center>';
echo '<table width="400" cellpadding="0" cellspacing="0" border="0">
<td valign="top">Fav bands to play shows with:</td>
<td align="left" width="200">';
echo stripslashes($row['favPlay']);
echo '</td></table>';
echo '<center>';
echo '<table width="400" cellpadding="0" cellspacing="0" border="0">
<td valign="top">Fav Promo Co:</td>
<td align="left" width="200">';
echo stripslashes($row['favPromoCo']);
echo '</td></table>';
echo '<center>';
echo '<table width="400" cellpadding="0" cellspacing="0" border="0">
<td valign="top">Fav Promoter:</td>
<td align="left" width="200">';
echo stripslashes($row['favBooker']);
echo '</td></table>';
echo '<center>';
echo '<table width="400" cellpadding="0" cellspacing="0" border="0">
<td valign="top">Records Sold:</td>
<td align="left" width="200">';
echo stripslashes($row['sold']);
echo '</td></table>';
echo '<center>';
echo '<table width="400" cellpadding="0" cellspacing="0" border="0">
<td valign="top">Discography:</td>
<td align="left" width="200">';
echo stripslashes($row['disco']);
echo '</td></table>';
echo '<br><br>';
?>
<center><form>
<input type="button" class="button" VALUE="New Search"
onclick="document.location.href='bsearch.php'"></form></center>
<?php
include 'bottomnav.asp';
include 'footer.asp';
?>