No I wasn't asking to be spoon feed here. I wasn't clear in my question, I was basically asking for a tutorial on how to do this. To answer your question, yes I have tried to do this on my own but it doesn't work. Here is the coding I have:
This part below works...
<?php
$hostname = "";
$user = "";
$pass = "";
$dbname = "";
$connection = mysql_connect("$hostname" , "$user" , "$pass");
$db = mysql_select_db($dbname , $connection) or die ("Cannot select db");
mysql_select_db("png");
$query = "SELECT DISTINCT series FROM png order by series asc ";
$result= mysql_query($query, $connection) or die
("Could not execute query : $q." . mysql_error());
while ($row=mysql_fetch_array($result)) {
$series=$row["series"];
$q = mysql_query("select * from `png` where `series`='$series'");
$numrows = mysql_num_rows($q);
echo "
<li><a href='series2.php?series=$series'>$series</a> ($numrows renders) </li> ";
}
?>
But when the series name is clicked nothing shows up. This is the coding I have for the result page:
<?php
$hostname = "";
$user = "";
$pass = "";
$dbname = "";
$connection = mysql_connect("$hostname" , "$user" , "$pass");
$db = mysql_select_db($dbname , $connection) or die ("Cannot select db");
mysql_select_db("png");
$displayGroup = 10;
if ($_GET['group'])
$displayGroup = $_GET['group'];
$page=0;
if ($_GET['screen'])
$page = $_GET['screen'];
$firstRow = $page * $displayGroup;
$lastRow = $firstRow + $displayGroup;
$currentRow = 0;
$totalRows = 0;
$numberDisplayed = 0;
$result = mysql_query
("select * from png where series='$series' order by id desc");
if (!$result) {
echo "<p>There is no data available!</p>";
return;
}
// Continue usual Code, display data
$c = 0;
echo '
<p align=\"center\">
<table border=\"0\" cellpadding=\"0\" cellspacing=\"2\" width=\"90%\"><tr><td> </td></tr> <tr>
';
while ($row = mysql_fetch_array($result))
{
extract($row);
if ($c == 0)
{
echo "
<td class=\"outline\">
<div id=\"st\">
<center><img src=\"$image\" class=\"button\" width=\"125\" height=\"100\" alt=\"$id\"></center>
<ul>
<li> <strong>date</strong>: $date </li>
<li> <a target=\"_new\" href=\"pngdownload.php?id=$id\"><strong>Download</strong></a>: $downloaded </li>
</ul>
</div>
</td>
";
}
else
{
echo "
<td class=\"outline\">
<div id=\"st\">
<center><img src=\"$image\" class=\"button\" width=\"125\" height=\"100\" alt=\"$id\"></center>
<ul>
<li> <strong>date</strong>: $date </li>
<li> <a target=\"_new\" href=\"pngdownload.php?id=$id\"><strong>Download</strong></a>: $downloaded </li>
</ul>
</div>
</td><tr></tr>
";
}
$c++;
$c = $c%2;
}
echo'</table><br />';
if ($screen > 0) {
$j = $screen - 1;
$url = "$PHP_SELF?screen=$j";
echo "<a href=\"$url\">Prev</a> | ";
}
// page numbering links now
for ($c = 0; $c < $pages; $c++) {
$url = "$PHP_SELF?screen=" . $c;
$j = $c + 1;
echo " <a href=\"$url\">[$j]</a> | ";
}
if ($screen < $pages-1) {
$j = $screen + 1;
$url = "$PHP_SELF?screen=$j";
echo "<a href=\"$url\">Next</a>";
}
?>