How do I do this simple thing...

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
klance
Forum Newbie
Posts: 3
Joined: Tue Mar 18, 2008 4:18 pm

How do I do this simple thing...

Post by klance »

How do I simulate what scorehero.com has here:
http://www.scorehero.com/top_scores.php

I want somone to click on one category and have it show other categories without having to make a bunch of different html pages.

How do I go about doing this? Would I use if/else statements?
wmguk
Forum Newbie
Posts: 16
Joined: Wed Jan 30, 2008 6:16 am

Re: How do I do this simple thing...

Post by wmguk »

klance wrote:How do I simulate what scorehero.com has here:
http://www.scorehero.com/top_scores.php

I want somone to click on one category and have it show other categories without having to make a bunch of different html pages.

How do I go about doing this? Would I use if/else statements?
would you only want the categories to be related, ie only action games on other action game pages etc?
User avatar
thomas777neo
Forum Contributor
Posts: 214
Joined: Mon Mar 10, 2003 6:12 am
Location: Johannesburg,South Africa

Re: How do I do this simple thing...

Post by thomas777neo »

Your going to need to create a database of some sort so that you can create the hyperlinks dynamically using only 1 page.

Have a look at PHP and MySQL perhaps. You could also use arrays, but it is usually better to create a database.

Query google for dependent drop down fields. You can then get an idea of what you want to achieve, use the same concept using hyperlinks.
klance
Forum Newbie
Posts: 3
Joined: Tue Mar 18, 2008 4:18 pm

Re: How do I do this simple thing...

Post by klance »

thomas777neo wrote:Your going to need to create a database of some sort so that you can create the hyperlinks dynamically using only 1 page.

Have a look at PHP and MySQL perhaps. You could also use arrays, but it is usually better to create a database.

Query google for dependent drop down fields. You can then get an idea of what you want to achieve, use the same concept using hyperlinks.
I'm not sure what you mean... I have MySQL and PHP, I know i'll need to use them, I just want to know how I would do this... Like what would the code be?
User avatar
Mini
Forum Newbie
Posts: 23
Joined: Mon Dec 04, 2006 4:39 am
Location: Netherlands

Re: How do I do this simple thing...

Post by Mini »

I'm not sure but i think this is what you need:

Code: Select all

<?php
//check what part should be shown, you can also use switch here :)
if($_GET[part]=="Part1")
{
// get the data you want to show and print it
echo "Viewing part1";
}
?>
<a href="?part=part1">View Part 1</a>
 
8)
Post Reply