Hi! This is what I'd like my page to display:
Results:
band1
band2
band3
etc...
band1 would be ($row[name]) from my table 'bands'. i want to format it so that it will show the names of the results, and then if the user wants more info, they can click on the name of the band, and it will go to a page that has all of info about them.
i'm using this code to try to achieve that, minus the link portion, but can't get the formatting right w/o the PARSE error.
i need help, i do. i'll be honest with you....
$favPromo = $HTTP_POST_VARS['favPromo'];
/ 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 favBooker ='$favPromo'";
$result = mysql_query($query)
or die (mysql_error());
$num_results = mysql_num_rows($result);
// show results, just name, can click on link for more info...
// THIS IS WHERE I GET THE PARSE ERROR
echo '
<table width="400" cellpadding="0" cellspacing="0" border="0">
<td valign="top">Results:</td>
<td align="left" width="200">';
echo '
for ($i=0; $i <$num_results; $i++)
{
$row = mysql_fetch_array($result);
echo '<tr class="table" valign="top">
<td>'.($i+1).'. ';
echo stripslashes($row['name'])<br>;
}
</td></table>
</center>';