Re: Pulling variables from a URL
| From: | Chris Shiflett | Date: | Tue, 14 Oct 2003 17:40:05 +0000 |
| Subject: | Re: Pulling variables from a URL | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-166094@lists.php.net to get a copy of this message | ||
--- Frank Tudor <frank_tudor@yahoo.com> wrote:
> I have a URL including variables... It looks like this:
>
> http://registration.php?username=111111&email=test@test.com
>
> But I can't pullit into the next page's form
>
> Here is what is in the form and other things I have tried:
>
> $username = $_HTTP_POST_VARS['username'];
>
> echo $_GET['$username'];
>
> echo $_POST['$username'];
>
> This page sumbits with PHP_SELF if that helps with this puzzle.
>
> Can someone tell me what I'm doing wrong?
I see a few things:
1. Pullit is not a word. :-)
2. http://registration.php is not a valid URL (until php
becomes a TLD).
3. $_GET['$username'] refers to a variable named $username, not username. You
should try $_GET['username'] instead.
Hope that helps.
Chris
=====
My Blog
http://shiflett.org/
HTTP Developer's Handbook
http://httphandbook.org/
RAMP Training Courses
http://www.nyphp.org/ramp