Re: stuck n00b
| From: | Chris Nielsen | Date: | Tue, 01 Oct 2002 19:04:21 +0000 |
| Subject: | Re: stuck n00b | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-118408@lists.php.net to get a copy of this message | ||
My form is actually using method="post". And I did use $_POST. Can't
remember if I tried $_GET, but if I'm using post would that even work? I'll
give it a try later and let you know.
"Jay Blanchard" <jay.blanchard@niicommunications.com> wrote in message
news:000101c2697c$4ad74bc0$8102a8c0@000347D72515...
> [snip]
> Submits to addUser.php:
>
> <?php
> echo $HTTP_SERVER_VARS['userName'];
> ?>
>
> Returns this error in my browser:
>
> Notice: Undefined index: userName in E:\Inetpub\wwwroot\Test\addUser.php
on
> line 11
>
> Is there a setting in my php.ini file I need to change? register_globals
is
> off, as that seems to be the preferred method now. But that's my issue,
> trying to access this external variable. $_REQUEST doesn't work. $_POST
> doesn't either. I have other scripts that it's working in, but I may not
> know what I'm saying here.
>
> PHP 4.2.3 on IIS (personal web server or whatever it's called) on WinXP
Pro.
> [/snip]
>
> You mentioned everything but $_GET{'userName'] :^]
> Since the form method=GET this is what you would have to do to 'get' the
> result you're looking for.
>
> HTH!
>
> Jay
>
>