Markbad311
01-30-2006, 03:05 PM
Getting a completly blank page on this one too. I am just displaying entries out of my table the field list is in the while loop.
<?php
ini_set("display_errors", "1");
error_reporting(E_ALL);
$page_title = "Battle of the Bands";
require("../listingsfunc.php");
dbconnect();
pagecount($page_title);
$table_name = "battle_bands_2006";
$sql = "SELECT *
FROM $table_name
WHERE 1
LIMIT 0 , 30";
$result = mysql_query($sql, $connection) or die (mysql_error());
$rock_block = "<table class=\"gbook\" width=\"70%\" align=\"center\">";
//While loop will create an array called $row
while ($row = mysql_fetch_array($result)) {
// get individual elements from the array
$id = ($row['id'])
$date = ($row['date']);
$band_name = ($row['band_name']);
$time = ($row['time']);
$genre = ($row['genre']);
$web_site = ($row['web_site']);
$e_mail = ($row['e_mail']);
$rock_block .= "
<tr class=\"gb_bar\">
<td colspan=\"2\"><span class=\"title_bar\">$band_name <br/>Date of Show: $date</span></td>
</tr>
<tr>
<td colspan=\"2\" class=\"msgblock\">Time on Stage: $time</td>
</tr>
<tr>
<td colspan=\"2\" class=\"msgblock\">Genre: $genre</td>
</tr>
<tr>
<td colspan=\"2\" class=\"msgblock\">Band E-Mail: $e_mail</td>
</tr>
";
if ($website != "") {
$rock_block .= "
<tr>
<td colspan=\"2\" class=\"msgbottom\"><span class=\"web\"><a href=\"$web_site\" title=\"Battle of the Bands\" target=\"_blank\">Band's Site</a> </span></td>
</tr>
";
} else {
$rock_block .= "
<tr>
<td colspan=\"2\" class=\"msgbottom\"><span class=\"web\">Sorry this band has no Web Site</span></td>
</tr>";
}
}
$rock_block .= "</table>";
mysql_close($connection);
?>
this just creates a table and one of the <TR> can be ommited if there is no result for $web_site Like I said I don't even get an error messgae with this one. Thanks!
<?php
ini_set("display_errors", "1");
error_reporting(E_ALL);
$page_title = "Battle of the Bands";
require("../listingsfunc.php");
dbconnect();
pagecount($page_title);
$table_name = "battle_bands_2006";
$sql = "SELECT *
FROM $table_name
WHERE 1
LIMIT 0 , 30";
$result = mysql_query($sql, $connection) or die (mysql_error());
$rock_block = "<table class=\"gbook\" width=\"70%\" align=\"center\">";
//While loop will create an array called $row
while ($row = mysql_fetch_array($result)) {
// get individual elements from the array
$id = ($row['id'])
$date = ($row['date']);
$band_name = ($row['band_name']);
$time = ($row['time']);
$genre = ($row['genre']);
$web_site = ($row['web_site']);
$e_mail = ($row['e_mail']);
$rock_block .= "
<tr class=\"gb_bar\">
<td colspan=\"2\"><span class=\"title_bar\">$band_name <br/>Date of Show: $date</span></td>
</tr>
<tr>
<td colspan=\"2\" class=\"msgblock\">Time on Stage: $time</td>
</tr>
<tr>
<td colspan=\"2\" class=\"msgblock\">Genre: $genre</td>
</tr>
<tr>
<td colspan=\"2\" class=\"msgblock\">Band E-Mail: $e_mail</td>
</tr>
";
if ($website != "") {
$rock_block .= "
<tr>
<td colspan=\"2\" class=\"msgbottom\"><span class=\"web\"><a href=\"$web_site\" title=\"Battle of the Bands\" target=\"_blank\">Band's Site</a> </span></td>
</tr>
";
} else {
$rock_block .= "
<tr>
<td colspan=\"2\" class=\"msgbottom\"><span class=\"web\">Sorry this band has no Web Site</span></td>
</tr>";
}
}
$rock_block .= "</table>";
mysql_close($connection);
?>
this just creates a table and one of the <TR> can be ommited if there is no result for $web_site Like I said I don't even get an error messgae with this one. Thanks!