Page 1 of 1

Phpish Navigation.?

Posted: Sun May 11, 2003 4:51 am
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)

Posted: Sun May 11, 2003 11:02 am
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";

Posted: Sun May 11, 2003 1:13 pm
by m3mn0n