Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to manage pages and add search feature?

Posted on 2008-06-24
2
Medium Priority
?
198 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 1000 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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

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

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
This article discusses four methods for overlaying images in a container on a web page
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 look for a specific file type in a local or remote server directory using PHP.
Suggested Courses

610 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