Jump to content

vitaminE

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

vitaminE's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. http://netroxy.com/51274581336/search.htm This would be the page i am trying to make it like. This page is an example of the table I am trying to build. This is not the working result. I am trying to categories my games to make users access the games easier. Lets say the user visits the website. User decides to click on Skills link (ex. www.blabla.com/gameslist.php?page=skills). As the user clicks Skills link, the pagination script displays results only for Skill games found in the database, hence finding them from the 'fldCategory' column, and displays the results horizontally and underneath each other. The same idea applies to searching for Action games '.php?page=action', or Adventure '.php?page=adventure' etc... etc...
  2. Thank you so much! I have my own page here, http://netroxy.com/51274581336/search.htm You can see its a very neat table displaying the results horizontally. the Images come from 'fldIconMedium' column, titles come from 'fldTitle' column, and the links come from 'fldLink' column to hyperlink each results to their games.
  3. Hi Perky thanks for the link. I'll take a look at it. I'd like to know if its difficult displaying results horizontally? Would anybody else help me with the last 2 points? :-\
  4. Hello friends. I have a pagination script and there are 3 issues I cant seem to figure out. Here is the code: <?php // page_name.php $page = $_GET['page']; //some code $your_db = @ new mysqli("hostname", "username", "password"); if (mysqli_connect_errno()) { echo 'ERROR!<br />'.mysqli_connect_errno() .' - Not connected : '.mysqli_connect_error().'<br />'; die; } else { $db_connect = $your_db->select_db("database"); if (!$db_connect) { echo 'ERROR CONNECT DATA BASE'; die; } } $query = "select fldIconMedium, fldTitle, fldLink from games"; //$result = $db_connect->query($query); $result = $your_db->query($query); $number_of_records = $result->num_rows; $num_pages = $number_of_records / 16; if (($number_of_records % 16) > 0 ) { $num_pages++; } if (strlen($page) == 0) { $page = 0; } else { $page = $page * 16; } $br = 1; $result->data_seek($page); for ($i = $page; $i < $number_of_records; $i++) { //$row = $result->fetch_array(); $row = $result->fetch_assoc(); if ($br <= 16) { echo '<b>'.stripslashes($row['fldIconMedium']).' </b>'; echo stripslashes($row['fldTitle']).' '; echo '<b>'.stripslashes($row['fldLink']).'</b><br />'; $br++; } else { break; } } for ($j = 0; $j < $num_pages; $j++) { $page_link = $j + 1; echo '<a href="games2.php?page='.$j.'">'.$page_link.'</a>'; } echo ' '.$number_of_records; ?> Here is a database I am using: |fldID| |fldTitle| | fldCategory | fldIconMedium | | fldLink | 2415 Krusty Fun House Skills krusty.jpg games.php?id=2415 2415 Krusty Fun House Skills krusty.jpg games.php?id=2415 2415 Krusty Fun House Skills krusty.jpg games.php?id=2415 2415 Krusty Fun House Adventure krusty.jpg games.php?id=2415 2415 Krusty Fun House Adventure krusty.jpg games.php?id=2415 2415 Krusty Fun House Adventure krusty.jpg games.php?id=2415 2415 Krusty Fun House Action krusty.jpg games.php?id=2415 2415 Krusty Fun House Action krusty.jpg games.php?id=2415 2415 Krusty Fun House Action krusty.jpg games.php?id=2415 I have a couple of issues as I am still a noob learning PHP. ===================================== 1. I have no idea how to add a 'Previous' and 'Next' button to the pagination number bar. 2. My results are displayed vertical and I can't make my results display in a horizontal view. 5 results going from left to right and results from top to bottom Basically 5 x 7 table 3. I have an issue with categorizing my games in my pagination table. I have multiple categories like Action, Skills, Arcade, Skills, Mind, Shooter in my database. For example, the pagination script above creates the link to be like this '.php?page=1', when in fact I want the script to search for categories games, example '.php?page=skills', '.php?page=action', '.php?page=adventure' etc..., linking them to the 'fldCategory' column which has the list of the category names of games, and then fetching all the rows of that particular game category and be displayed in the 5 x 7 table. For each result, it would have the Image Icon (fldIconMedium), the Title (fldTitle) under it, and both of them hyper linked to their links from the 'fldLinks' column. I would really appreciate the help. It has been 2 weeks and I'm very frustrated that I can't figure the 3 points out. :'(
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.