Re: default value of a variable
| From: | Rasmus Lerdorf | Date: | Thu, 22 Aug 2002 15:44:22 +0000 |
| Subject: | Re: default value of a variable | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-113639@lists.php.net to get a copy of this message | ||
> 1) This isn't working unless the form is submitted...
>
> if (!isset($HTTP_POST_VARS['step'])) { $step=$HTTP_POST_VARS['step']; }
>
> I get the error: Notice: Undefined index
Hrm? You check to see if $HTTP_POST_VARS['step'] is not set, and if it
isn't set you try to read the value and put it into $step. That makes no
sense. Obviously you will get an undefined index warning.
-Rasmus