Re: Passing a variable without ?var=

From: Ian.H (ian_at_WINDOZEdigiserv.net)
Date: 04/04/04


Date: Sun, 04 Apr 2004 02:14:58 GMT

On Sun, 04 Apr 2004 02:13:10 +0000, Ian.H wrote:

>> That is my conclusion so I abandoned the idea. It doesn't
>> look all that unprofessional and if I wanted to hide the
>> page names I could always change to a switch statement in
>> the PHP instead. I like the way it is now so I'll just leave
>> it that way.
>>
>> Thanks for the help though!
>
>
> You could use PATH_INFO:
>
>
> $pi = explode('/', $_SERVER['PATH_INFO']);
> $page = $pi[0];

Here we go again =[

That should be:

   $page = $pi[1];

$pi[0] is empty.

Regards,

  Ian

-- 
Ian.H
digiServ Network
London, UK
http://digiserv.net/


Relevant Pages

  • Re: variables and values
    ... i'm very new to php and i'm a little confused about something. ... >> this will be dead simple to the rest of you but it doesn't work for ... Ian ... digiServ Network ...
    (comp.lang.php)
  • Re: WAP and <? tag
    ... don't know if the reference differs for PHP.. ... Ian ... digiServ Network ...
    (comp.lang.php)
  • Re: Transliterate characters
    ... > How does this oneliner look like in php? ... > Leszek Dubiel ... Ian ... digiServ Network ...
    (comp.lang.php)
  • Re: How to call script from html page?
    ... > TestPage.php that I want to convert to TestPage.html - but still call a php ... > script from it. ... Ian ... digiServ Network ...
    (comp.lang.php)
  • Re: Webware vs. PHP - performance comparision!!!
    ... > Hello Ian, ... >> I don't think this testing code is reliable. ... > But PHP is still faster, ... Webware has more intermediary steps for each request. ...
    (comp.lang.python)