Solved

How to manage pages and add search feature?

Posted on 2008-06-24
2
194 Views
Last Modified: 2013-12-12
Hello group,

I'm still learning PHP and have create a PHP page which allow users to upload a game (Flash base - *.swf). Of course, each game occupies a row in a table presenting its name, description and ....
it works fine but now I have run into a situation that adding these games will make long table.

1) How can I implement a code to take care of this situaiton? meaning that if number of uploaded files is more than 5 then show the rest of them in a 2nd page, 3rd page and so on. Like the way emails are shown and each user can get to Previous or Next page or using 1 2 3 4 ... n  links ?

2) Also, I need to allow user to search for a specific game name. Names are stored in a MySQL table and I have an idea but will be great if you could advise me on this thing too.

3) For the sorting, should I use only the sorting functions in PHP?

Regards.

0
Comment
Question by:akohan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 14

Accepted Solution

by:
Vel Eous earned 250 total points
ID: 21862402
1) Pagination - http://www.tonymarston.net/php-mysql/pagination.html

2) Really depends on what criteria you are searching.  A very basic example would be:
    mysql_query ( "SELECT * FROM uploads WHERE title LIKE '%$var%'" );

3) Use a combination of PHP & MySQL to order your data.
0
 

Author Comment

by:akohan
ID: 21863125

Nice link. Thank you so much.

0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question