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
Solved

How to manage pages and add search feature?

Posted on 2008-06-24
2
191 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
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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying 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

Suggested Solutions

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
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…
The viewer will learn how to dynamically set the form action using jQuery.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

809 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