Phpish Navigation.?

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
DaisysDung
Forum Newbie
Posts: 1
Joined: Sun May 11, 2003 4:51 am

Phpish Navigation.?

Post by DaisysDung »

Quick message to ask:

I have seen a few websites do index.php?id=About and I have seen some websites do index.php?id=About&page=1 (2, 3, 4, 5, etc.)

I read the tutorial on how to do index.php?id=About from the Evilwalrus website, yet I have not seen a tutorial on how to do the &page=1 extensions after whichever Id= is selected.

What I am asking for is or does anyone know where I can find a tutorial on how to create the &page=1 etc extensions after the ID= selection WITHOUT using a MySQL database?...

Cheers for any replies guys (and girls :P)
User avatar
phice
Moderator
Posts: 1416
Joined: Sat Apr 20, 2002 3:14 pm
Location: Dallas, TX
Contact:

Post by phice »

Using key1=value1&key2=value2 doesn't require anything of mysql. ;)

Let's say you want the address to be:
index.php?id=About&page=2

Now, when index.php is loading on the server, the two variables (id, and page) are made. In example, whatever id is set to (in this case, About), it would become $id = "About"; in your PHP code. Whatever page is set to in the address bar (in this case, 2), it would become $page = "2";

So, let's look at another example...

address: http://www.domain.com/index.php?[b]page_id=12[/b]&mode=view&phu=TRUE

In your PHP code, using the address above, the following variables are set:
  • $page_id = "12";
    $mode = "view";
    $phu = "TRUE";
Image Image
User avatar
m3mn0n
PHP Evangelist
Posts: 3548
Joined: Tue Aug 13, 2002 3:35 pm
Location: Calgary, Canada

Post by m3mn0n »

Post Reply