G
Guest
Guest
Hi There
This is driving me around the twist, it is a simple task yet it will not except it.
<?
if ($Category != "") {
$query = "SELECT * FROM Downloads ";
if ($Category != 0) {
$query .= "WHERE Category=" . $Category;
}
$rst = mysql_query($query, $con);
if (!$rst) {
echo mysql_error();
mysql_close($con);
exit;
}
if (mysql_num_rows($rst) == 0 ) {
echo "<TD colspan=\"4\"font size=\"2\" text=\"#FFFFFF\"><FONT FACE=ARIAL SIZE=2>No items in category</FONT></TD></TEXT>";
} else {
$MAXPAGES = mysql_num_rows($rst);
for($i=0;$i<($CurrentPage-1) * $DOWNLOADS_PER_PAGE; $i++) {
if (!$row = mysql_fetch_row($rst)) {
exit;
}
}
$i=0;
while (($row = mysql_fetch_row($rst)) && $i<10) {
$i++;
echo "<TR>\n";
echo "\t\t<TD><FONT FACE=ARIAL SIZE=2><A HREF=\"sendfile.php3?Product=" . $row[4] . "&DownloadID=" . $row[0];
if ($row[7] != "")
{
echo "&redirect=" . $row[7];
}
echo "\">" . $row[1] . "</A></FONT></TD>\n";
echo "\t\t<TD><FONT FACE=ARIAL SIZE=2>" . $row[2] . "</FONT></TD>\n";
echo "\t\t<TD><FONT FACE=ARIAL SIZE=2>" . $row[3] . "</FONT></TD>\n";
echo "\t\t<TD><FONT FACE=ARIAL SIZE=2>" . $row[5] . "</FONT></TD>\n";
echo "\t</TR>\n";
}
}
}
mysql_close($con);
?>
</TABLE>
<HR>
<font color="#FFFFFF">
<?
if ($CurrentPage == 1) {
if (($CurrentPage * $DOWNLOADS_PER_PAGE) > $MAXPAGES) {
echo "<FONT FACE=ARIAL SIZE=2><b>| Previous Page | Next Page |</b></FONT>";
} else {
echo "<FONT FACE=ARIAL SIZE=2><b>| Previous Page | </b><A HREF=\"downloads.php3?Category=$Category&CurrentPage=2\"><b>Next Page</b></A> |</FONT>";
}
} elseif ($CurrentPage > 1) {
if (($CurrentPage * $DOWNLOADS_PER_PAGE) > $MAXPAGES) {
echo "<FONT FACE=ARIAL SIZE=2>| <A HREF=\"downloads.php3?Category=$Category&CurrentPage=" .($CurrentPage -1) . "\">Previous Page</A><b> | Next Page |</b></FONT>";
} else {
echo "<FONT FACE=ARIAL SIZE=2>| <A HREF=\"downloads.php3?Category=$Category&CurrentPage=" .($CurrentPage -1) . "\">Previous Page</A> | <A HREF=\"downloads.php3?Category=$Category&CurrentPage=" . ($CurrentPage+1) . "\">Next Page</A> |</FONT>";
}
}
?>
all I want to do is change the echo text (No items in category) to the colour White as I have a dark background, I have tried everything.
I have had no problem changing anything else in the coding.
look forward to any reply
Richard
This is driving me around the twist, it is a simple task yet it will not except it.
<?
if ($Category != "") {
$query = "SELECT * FROM Downloads ";
if ($Category != 0) {
$query .= "WHERE Category=" . $Category;
}
$rst = mysql_query($query, $con);
if (!$rst) {
echo mysql_error();
mysql_close($con);
exit;
}
if (mysql_num_rows($rst) == 0 ) {
echo "<TD colspan=\"4\"font size=\"2\" text=\"#FFFFFF\"><FONT FACE=ARIAL SIZE=2>No items in category</FONT></TD></TEXT>";
} else {
$MAXPAGES = mysql_num_rows($rst);
for($i=0;$i<($CurrentPage-1) * $DOWNLOADS_PER_PAGE; $i++) {
if (!$row = mysql_fetch_row($rst)) {
exit;
}
}
$i=0;
while (($row = mysql_fetch_row($rst)) && $i<10) {
$i++;
echo "<TR>\n";
echo "\t\t<TD><FONT FACE=ARIAL SIZE=2><A HREF=\"sendfile.php3?Product=" . $row[4] . "&DownloadID=" . $row[0];
if ($row[7] != "")
{
echo "&redirect=" . $row[7];
}
echo "\">" . $row[1] . "</A></FONT></TD>\n";
echo "\t\t<TD><FONT FACE=ARIAL SIZE=2>" . $row[2] . "</FONT></TD>\n";
echo "\t\t<TD><FONT FACE=ARIAL SIZE=2>" . $row[3] . "</FONT></TD>\n";
echo "\t\t<TD><FONT FACE=ARIAL SIZE=2>" . $row[5] . "</FONT></TD>\n";
echo "\t</TR>\n";
}
}
}
mysql_close($con);
?>
</TABLE>
<HR>
<font color="#FFFFFF">
<?
if ($CurrentPage == 1) {
if (($CurrentPage * $DOWNLOADS_PER_PAGE) > $MAXPAGES) {
echo "<FONT FACE=ARIAL SIZE=2><b>| Previous Page | Next Page |</b></FONT>";
} else {
echo "<FONT FACE=ARIAL SIZE=2><b>| Previous Page | </b><A HREF=\"downloads.php3?Category=$Category&CurrentPage=2\"><b>Next Page</b></A> |</FONT>";
}
} elseif ($CurrentPage > 1) {
if (($CurrentPage * $DOWNLOADS_PER_PAGE) > $MAXPAGES) {
echo "<FONT FACE=ARIAL SIZE=2>| <A HREF=\"downloads.php3?Category=$Category&CurrentPage=" .($CurrentPage -1) . "\">Previous Page</A><b> | Next Page |</b></FONT>";
} else {
echo "<FONT FACE=ARIAL SIZE=2>| <A HREF=\"downloads.php3?Category=$Category&CurrentPage=" .($CurrentPage -1) . "\">Previous Page</A> | <A HREF=\"downloads.php3?Category=$Category&CurrentPage=" . ($CurrentPage+1) . "\">Next Page</A> |</FONT>";
}
}
?>
all I want to do is change the echo text (No items in category) to the colour White as I have a dark background, I have tried everything.
I have had no problem changing anything else in the coding.
look forward to any reply
Richard