Hi bpat1434,
I made the changes and i still got no output. So i thought about changing
echo '<td>'.$row[1].'</td>';
to:
echo '<td>'.$row[image].'</td>'; // "image" is the name of one of the rows in my database
and it worked perfectly 🙂
<?php
$max_width = 2; // Define how many you want across here.
$page = 'alt'; // This is the genre identifier. This will change from page to page.
include_once('connect.php'); // My file with the connection string
$query = "SELECT * FROM `stations` WHERE genre='$page'";
$result = @mysql_query($query);
if(!$result)
die('mySQL Errror ('.mysql_errno().'): '.mysql_error());
// Start the table
echo '<table border="1">
<tr>';
$i=1; // And a counter
while($row = mysql_fetch_assoc($result))
{
echo '<td><font face="arial" size="2"><div align="center"><img src="'.$row[image].'"><br><a href="radioplayer.php?scip='.$row[server].'&scport='.$row[port].'">Click Here To Listen</a></td>';
if($i%$max_width == 0) // Are we at our max width? 2 items across?
echo '</tr><tr></font>';
// Increment the counter
$i++;
}
echo '</tr></table>';
?>
Now, i was just wondering about this... It doesnt matter, but it would be a nice feature.
Say, for example, the script returns 5 results, could the script merge the bottom cell so it's the width of the table, as the missing cell looks a little un-pretty..
As i said, it's not necessary, i just think it would be useful 🙂
Thank you SO much for all of your help
Davey 🙂