Page 1 of 1

How do I do this simple thing...

Posted: Tue Mar 18, 2008 9:20 pm
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?

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

Posted: Wed Mar 19, 2008 12:26 am
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?

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

Posted: Wed Mar 19, 2008 8:50 am
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.

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

Posted: Wed Mar 19, 2008 9:45 am
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?

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

Posted: Wed Mar 19, 2008 4:47 pm
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)