Hello friends. Sorry for not responding sooner. For the code I am using, I had help from another expert. I thank him, but here is the code I have so far.
===========================
===========================
Code: Select all
<?php
$cat=1;
$nor=15;
$a=1;
if(isset($_GET['cat']))
{
}
else
{
$_GET['cat']=1;
}
echo $_GET['cat'];
$con=mysql_connect("host","nusername","password")
or die ("error");
$db=mysql_select_db("database",$con)
or die("Database not found!");
$result=mysql_query("SELECT * FROM games")
or die ("query error");
echo "<table border='1'><tr><th>ImageIcon</th><th>Title</th></tr>";
$r=mysql_num_rows($result);
echo $r."<br/>";
$p=ceil($r/$nor);
//echo $p;
while($rows=mysql_fetch_array($result))
{
if($a>($_GET['cat']-1)*$nor)
{
echo "<tr><td>".$rows['fldIconMedium']."</td><td>".$rows['fldTitle']."</td></tr>";
}
$a=$a+1;
}
echo "</table>";
for($i=1;$i<=$p;$i++)
{
if($i==$_GET['cat'])
{
echo $i;
}
else
{
echo "<a href='gameslist.php?cat=".$i."'>".$i."</a>";
}
}
?>
===========================
===========================
To see this code in action, heres the link
http://netroxy.com/gameslist.php?cat=skills.
I am expecting the games search results page to look like this:
http://netroxy.com/51274581336/search.htm
So basically its:
- viewing how many games found for game category, ex: Skills. Or Action, Mind, etc..
- the URL containing 'gameslist.php?cat=' with the given ID category at the end should search for that given category and display at least 15 games per results, along the number bar bellow, which counts how many are found from that category, which automatically increases or decreases the number bar bellow depending how many games from that specific category was found. I also forgot to mention that I did not add the Previous and Next button, which i dont know how
- As for the 15 results per page, its basically 15 images (fldIconMedium) of different games of the same category, with their Titles (fldTitle) underneath them and both image and title should have the LINK to that specific game. When those 15 results per page are displayed, the link '
http://www.blabla.com/games.php?id=' should be the link for all the title Text links and the image links, and it should add the ID (fldID) next to '
http://www.blabla.com/games.php?id=' for each game category found.