View Full Version : advanced php question


CuJo
07-02-2003, 07:33 PM
well you guys no how you can make
links go like this:
index2.php?main=login

is it possible to have to different text files included....
so if you click a link and go to
index2.php?main=users/login
then you click a link on that page and it opens a sub-menu or something?

so it whould be

index2.php?main=login?menu=hello

i tried like that but it didn't work....

Ökii
07-02-2003, 08:36 PM
seperate var=value pairs in the url with an ampersand & rather than a questionmark ?

index2.php?main=login&menu=hello

would yield

$_GET['main'] => 'login'
$_GET['menu'] => 'hello'

both of which are accessible within any file included into index2.php

CuJo
07-03-2003, 03:35 AM
thanks okii!

it worked ;)