Re: parse URL good syntaxe please
| From: | lallous | Date: | Tue, 13 Aug 2002 15:24:50 +0000 |
| Subject: | Re: parse URL good syntaxe please | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-112321@lists.php.net to get a copy of this message | ||
you can use isset()
better grab a PHP starter document or tutorial.
Elias
"Christian Ista" <christian.ista@teledisnet.be> wrote in message
news:20020813141833.36492.qmail@pb1.pair.com...
> Hello,
>
> Could you tell me why on PHP 4.2.2 this code work
>
> <?php
> switch ($_GET['fuseaction'])
> {
> case 0:
> print "i equals 0";
> break;
> default:
> print "i is not equal to 0, 1 or 2";
> }
> ?>
>
> and this one not :
>
> <?php
> switch ($fuseaction)
> {
> case 0:
> print "i equals 0";
> break;
> default:
> print "i is not equal to 0, 1 or 2";
> }
> ?>
>
> In both cases when fuseaction is not defined, I receive an error. Could
you
> tell me how to know if the variable is defined in the URL. In coldfusion
you
> can do <cfif isDefined("URL.fuseaction")>
>
> but in php ?
>
> Bye
>
>