[PHP] Re: QUERY_STRING Variables and POST

2005-12-08 Thread Roman Ivanov

Michael B Allen wrote:

I'm using the POST method but I would also like to access QUERY_STRING
parameters. Is there a convienient global array for these? If not,
what is the definitive method for accessing them?


$_GET
$_REQUEST
+
read manual

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



Re: [PHP] Re: QUERY_STRING Variables and POST

2005-12-08 Thread Michael B Allen
On Thu, 08 Dec 2005 17:56:14 -0500
Roman Ivanov [EMAIL PROTECTED] wrote:

 Michael B Allen wrote:
  I'm using the POST method but I would also like to access QUERY_STRING
  parameters. Is there a convienient global array for these? If not,
  what is the definitive method for accessing them?
 
 $_GET
 $_REQUEST
 +
 read manual

Using the POST method and a URL like:

  http://server.com/foo.php?name=value

I get:

  $_SERVER['QUERY_STRING']  // empty string
  $_GET['name'] // not defined
  $_SERVER['PHP_SELF']  // no ?name=value
  $_REQUEST['QUERY_STRING'] // empty string

Any ideas?

Thanks,
Mike

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



Re: [PHP] Re: QUERY_STRING Variables and POST

2005-12-08 Thread Zack Bloom
use $_REQUEST['name'] to get value

On 12/8/05, Michael B Allen [EMAIL PROTECTED] wrote:

 On Thu, 08 Dec 2005 17:56:14 -0500
 Roman Ivanov [EMAIL PROTECTED] wrote:

  Michael B Allen wrote:
   I'm using the POST method but I would also like to access QUERY_STRING
   parameters. Is there a convienient global array for these? If not,
   what is the definitive method for accessing them?
 
  $_GET
  $_REQUEST
  +
  read manual

 Using the POST method and a URL like:

 http://server.com/foo.php?name=value

 I get:

 $_SERVER['QUERY_STRING']  // empty string
 $_GET['name'] // not defined
 $_SERVER['PHP_SELF']  // no ?name=value
 $_REQUEST['QUERY_STRING'] // empty string

 Any ideas?

 Thanks,
 Mike

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




Re: [PHP] Re: QUERY_STRING Variables and POST

2005-12-08 Thread Michael B Allen
Solved. My mistake. I was visiting the form with a URL that had
QUERY_STRING parameters but when I submit the form the QUERY_STRING is
not propagated.

In my particular case I replaced the form tag with the following PHP:

?php
echo form action=\ . $_SERVER['REQUEST_URI'] . \ method=\post\;
?

Also, regarding my original question, I think parse_str is what I want.

Thanks,
Mike

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



[PHP] Re: $QUERY_STRING

2001-11-13 Thread dav

Try getenv() function to import the query string from apache ambient.
This is not a bug, maybe the index.php?1 isn't standard at all.
Ernesto [EMAIL PROTECTED] ha scritto nel messaggio
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

 Hi,

 I'm a newbie using Apache 1.3.22 and PHP 4.0.6 on Windows.
 I'm trying to access the $QUERY_STRING var, but it's empty even when I
 do have a query string. On one server (Win2K), it works ok. On the other
 server (WinXP) it's always empty.
 If I use index.php?s=1, $HTTP_GET_VARS['s'] is 1, but I need the raw
 query string because it's something like index.php?1.

 Is this a known bug on PHP/WinXP?

 Regards,
 Ernesto




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: $QUERY_STRING

2001-11-13 Thread Ernesto


Nop. getenv(QUERY_STRING) also returns an empty string.
The crazy thing is that getenv returns an empty string instead of FALSE.
Anyway, if I do index.php?a=1, I get HTTP_GET_VARS['a']==1, but 
$QUERY_STRING is still empty :(


dav wrote:

 Try getenv() function to import the query string from apache ambient.
 This is not a bug, maybe the index.php?1 isn't standard at all.

 Ernesto [EMAIL PROTECTED] ha scritto nel messaggio
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 
Hi,

I'm a newbie using Apache 1.3.22 and PHP 4.0.6 on Windows.
I'm trying to access the $QUERY_STRING var, but it's empty even when I
do have a query string. On one server (Win2K), it works ok. On the other
server (WinXP) it's always empty.
If I use index.php?s=1, $HTTP_GET_VARS['s'] is 1, but I need the raw
query string because it's something like index.php?1.

Is this a known bug on PHP/WinXP?

Regards,
Ernesto


 
 
 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: $QUERY_STRING

2001-11-13 Thread John Steele

Hi Ernesto,

  Try taking a look at the HTTP_SERVER_VARS array:

test.php?1

HTTP_SERVER_VARS[argc] = 1
HTTP_SERVER_VARS[argv] = array([0] = test)


XPerience the new windows (scary!) :)
  John


Nop. getenv(QUERY_STRING) also returns an empty string.
The crazy thing is that getenv returns an empty string instead of FALSE.
Anyway, if I do index.php?a=1, I get HTTP_GET_VARS['a']==1, but 
$QUERY_STRING is still empty :(


dav wrote:

 Try getenv() function to import the query string from apache ambient.
 This is not a bug, maybe the index.php?1 isn't standard at all.

 Ernesto [EMAIL PROTECTED] ha scritto nel messaggio
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 
Hi,

I'm a newbie using Apache 1.3.22 and PHP 4.0.6 on Windows.
I'm trying to access the $QUERY_STRING var, but it's empty even when I
do have a query string. On one server (Win2K), it works ok. On the other
server (WinXP) it's always empty.
If I use index.php?s=1, $HTTP_GET_VARS['s'] is 1, but I need the raw
query string because it's something like index.php?1.

Is this a known bug on PHP/WinXP?

Regards,
Ernesto

--
/* SteeleSoft Consulting John Steele - Systems Analyst/Programmer
 *  We also walk dogs...  Dynamic Web Design  PHP/MySQL/Linux/Hosting
 *  www.steelesoftconsulting.com [EMAIL PROTECTED]
 */

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]