then run extract($_REQUEST);  just above where you want to use the var1
var2...  and it will place all the key => value pairs into the local scope.

Jim
----- Original Message -----
From: "Noah" <[EMAIL PROTECTED]>
To: "Philip Olson" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, January 29, 2003 5:55 PM
Subject: Re: [PHP] Form Variables not getting passed || Apache, MySql, Win
2k Setup


> I don't want to use $_REQUEST['my_passed_variable'] at all.
>
> Right now when I do an sql insert on my local machine I have to use the
> following syntax:
>
> INSERT into tablename (field name list)
> VALUES ($_REQUEST['var1'],  $_REQUEST['var2'], $_REQUEST['var3'])
>
> I just want to use $var1, $var2, $var3
>
> --Noah
>
> ----- Original Message -----
> From: "Philip Olson" <[EMAIL PROTECTED]>
> To: "CF High" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Wednesday, January 29, 2003 2:23 PM
> Subject: Re: [PHP] Form Variables not getting passed || Apache, MySql, Win
> 2k Setup
>
>
> >
> > One too many $'s in your code, use:
> >
> >     $_REQUEST['my_passed_variable']
> >
> > This is how all arrays work, autoglobals are the same.
> > See also:
> >
> >     http://www.php.net/variables.external
> >     http://www.php.net/variables.predefined
> >
> > Regards,
> > Philip
> >
> > On Wed, 29 Jan 2003, CF High wrote:
> >
> > > Hey all.
> > >
> > > This driving me nuts:
> > >
> > >     I've got Apache, MySql, and Windows 2000 running on my local
> machine.
> > > In order to get passed php variables evaluated, whether via a url
query
> > > string, or through a form post, I have to use this syntax:
> > >
> > > $_REQUEST[$my_passed_variable]
> > >
> > > I have no such problem with our hosting company servers; i.e. I can
> access
> > > query_string and form posted variables as $my_passed_variable.
> > >
> > > What is going on here? Is there something in php.ini that needs to be
> > > adjusted?
> > >
> > > Any help whatsoever here is much appreciated,
> > >
> > > --Noah
> > >
> > > --
> > >
> > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to