[PHP] $HTTP_POST_VARS problem

2002-12-16 Thread Lee P. Reilly
Hi there,

I'm currently using PHP 4.2.2 and I am have encountered some problems
when trying to access $HTTP_POST_VARS. The following statements have the
following return values:

echo $HTTP_POST_VARS['userfile'];
= C:\\Documents and Settings\\Administrator\\Desktop\\IR Files\\gmp1.ir

echo $userfile;
= C:\\Documents and Settings\\Administrator\\Desktop\\IR Files\\gmp1.ir

echo $HTTP_POST_VARS['userfile']['name'];
= NOTHING RETURNED

echo $HTTP_POST_VARS['userfile']['size'];
= NOTHING RETURNED

echo $userfile_size;
= NOTHING RETURNED

echo $userfile_name;
= NOTHING RETURNED

Does anyone know what the problem is? I suspect that the '\\' in the
path may have something to do with it.

Thanks,
Lee


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




Re: [PHP] $HTTP_POST_VARS problem

2002-12-16 Thread Jason Wong
On Monday 16 December 2002 23:48, Lee P. Reilly wrote:
 Hi there,

 I'm currently using PHP 4.2.2 and I am have encountered some problems
 when trying to access $HTTP_POST_VARS. The following statements have the
 following return values:

 echo $HTTP_POST_VARS['userfile'];
 = C:\\Documents and Settings\\Administrator\\Desktop\\IR Files\\gmp1.ir

Better to use $_POST.

 echo $userfile;
 = C:\\Documents and Settings\\Administrator\\Desktop\\IR Files\\gmp1.ir

 echo $HTTP_POST_VARS['userfile']['name'];
 = NOTHING RETURNED

Use $_FILES.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *

/*
In a gathering of two or more people, when a lighted cigarette is
placed in an ashtray, the smoke will waft into the face of the non-smoker.
*/


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




Re: [PHP] $HTTP_POST_VARS problem

2002-12-16 Thread rblack

Think you want $HTTP_POST_FILES rather than $HTTP_POST_VARS.

As in $HTTP_POST_FILES['userfile']['name'];

HTH,

Richy

==
Richard Black
Senior Developer, DataVisibility Ltd - http://www.datavisibility.com
Tel: 0141 951 3481
Email: [EMAIL PROTECTED]


   

Lee P.

Reilly  To: PHP [EMAIL PROTECTED]   

lreilly@lanl.   cc:   

gov Subject: [PHP] $HTTP_POST_VARS problem

   

16/12/2002 

15:48  

   

   





Hi there,

I'm currently using PHP 4.2.2 and I am have encountered some problems
when trying to access $HTTP_POST_VARS. The following statements have the
following return values:

echo $HTTP_POST_VARS['userfile'];
= C:\\Documents and Settings\\Administrator\\Desktop\\IR Files\\gmp1.ir

echo $userfile;
= C:\\Documents and Settings\\Administrator\\Desktop\\IR Files\\gmp1.ir

echo $HTTP_POST_VARS['userfile']['name'];
= NOTHING RETURNED

echo $HTTP_POST_VARS['userfile']['size'];
= NOTHING RETURNED

echo $userfile_size;
= NOTHING RETURNED

echo $userfile_name;
= NOTHING RETURNED

Does anyone know what the problem is? I suspect that the '\\' in the
path may have something to do with it.

Thanks,
Lee


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



This email has been scanned for all viruses by the MessageLabs SkyScan
service. For more information on a proactive anti-virus service working
around the clock, around the globe, visit http://www.messagelabs.com






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




Re: [PHP] $HTTP_POST_VARS problem

2002-12-16 Thread Chris Shiflett
--- Lee P. Reilly [EMAIL PROTECTED] wrote:
 The following statements have the following return
 values:
 
 echo $HTTP_POST_VARS['userfile'];
 = C:\\Documents and Settings\\Administrator\\Desktop\\IR
 Files\\gmp1.ir
 
 echo $userfile;
 = C:\\Documents and Settings\\Administrator\\Desktop\\IR
 Files\\gmp1.ir
 
 echo $HTTP_POST_VARS['userfile']['name'];
 = NOTHING RETURNED
 
 echo $HTTP_POST_VARS['userfile']['size'];
 = NOTHING RETURNED
 
 echo $userfile_size;
 = NOTHING RETURNED
 
 echo $userfile_name;
 = NOTHING RETURNED
 
 Does anyone know what the problem is?

What do you think the problem is? I don't see anything
unexpected, unless I'm missing something.

Chris

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




Re: [PHP] $HTTP_POST_VARS problem

2002-12-16 Thread Lee P. Reilly
Thanks for all the replies. However, I still have problems as the following code
produces the following output:

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
echo 0:  . $userfile . br;
echo 1:  . $HTTP_POST_FILES['userfile']['size'] . br;
echo 2:  . $HTTP_POST_FILES['userfile']['name'] . br;
echo 3:  . $HTTP_POST_FILES['userfile']['type'] . br;
echo 4:  . $HTTP_POST_FILES .  ( . sizeof($HTTP_POST_FILES) . )br;
echo 5:  . $HTTP_POST_FILES['userfile_size'] . br;
echo 6:  . $HTTP_POST_FILES['userfile']['type'] . br;
echo 7:  . $HTTP_POST_FILES['userfile_type'] . br;
echo 8:  . $usefile_type . br;

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
0: C:\\Documents and Settings\\Administrator\\Desktop\\IR Files\\gmp05.iR
1:
2:
3:
4: Array (0)
5:
6:
7:
8:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=



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




Re: [PHP] $HTTP_POST_VARS problem

2002-12-16 Thread Joseph W. Goff
It looks to me like you are trying to get an uploaded file?
If so, it isn't $HTTP_POST_VARS, it is $HTTP_POST_FILES or $_FILES if you
are using a version of PHP that has super globals.
See the PHP manual for more info:
http://www.php.net/manual/en/language.variables.predefined.php

- Original Message -
From: Chris Shiflett [EMAIL PROTECTED]
To: Lee P. Reilly [EMAIL PROTECTED]; PHP [EMAIL PROTECTED]
Sent: Monday, December 16, 2002 10:04 AM
Subject: Re: [PHP] $HTTP_POST_VARS problem


 --- Lee P. Reilly [EMAIL PROTECTED] wrote:
  The following statements have the following return
  values:
 
  echo $HTTP_POST_VARS['userfile'];
  = C:\\Documents and Settings\\Administrator\\Desktop\\IR
  Files\\gmp1.ir
 
  echo $userfile;
  = C:\\Documents and Settings\\Administrator\\Desktop\\IR
  Files\\gmp1.ir
 
  echo $HTTP_POST_VARS['userfile']['name'];
  = NOTHING RETURNED
 
  echo $HTTP_POST_VARS['userfile']['size'];
  = NOTHING RETURNED
 
  echo $userfile_size;
  = NOTHING RETURNED
 
  echo $userfile_name;
  = NOTHING RETURNED
 
  Does anyone know what the problem is?

 What do you think the problem is? I don't see anything
 unexpected, unless I'm missing something.

 Chris

 --
 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




Re: [PHP] $HTTP_POST_VARS problem

2002-12-16 Thread Lee P. Reilly
Problem solved:
I forgot to add the enctype to the original FORM tag.

Cheers,
Lee,


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




RE: [PHP] HTTP_POST_VARS problem

2002-02-08 Thread Tim Ward

Make the name of the select an array
e.g. select name='selection[]' ...

then ...
foreach($HTTP_POST_VARS[selection] as $selection)

Tim
www.chessish.com http://www.chessish.com 

--
From:  [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
Sent:  08 February 2002 02:47
To:  [EMAIL PROTECTED]
Subject:  Re: [PHP] HTTP_POST_VARS problem

Please ignore my question - I just figured it out. I had the
method=post
in the input type=submit tag rather than in the form tag. It
works!

However, if one has an HTML select/option menu scrolling list with
multiple
selections, how does one get the number of values for the same name
with
HTTP_POST_VARS? Or how does one scroll through the list of choices
passed?
Thanks,

Eurico

[EMAIL PROTECTED] wrote:

 Hi. I'm a newbie at this and am having problems understanding how
this
 works.

 I have a form with method=post. The server program does display
 REQUEST_STRING as I expect (e.g., choice=yes but displaying
 HTTP_POST_VARS[choice] is null). However, displaying
 HTTP_GET_VARS[choice] does display yes. Running phpinfo()
displays
 that the REQUEST_METHOD = GET. Why is this GET and how do I get it
set
 to POST? How do I get HTTP_POST_VARS to work since my form does
have
 method=post?

 Here are some php.ini settings (I'm running PHP 4.1.1 with Apache
1.3.22

 under Win98):

 variables_order = EGPCS
 register_globals = On
 register_argc_argv = On
 gpc_order = GPC

 Thanks...

 Eurico
 [EMAIL PROTECTED]

 --
 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] HTTP_POST_VARS problem

2002-02-07 Thread ejfs

Hi. I'm a newbie at this and am having problems understanding how this
works.

I have a form with method=post. The server program does display
REQUEST_STRING as I expect (e.g., choice=yes but displaying
HTTP_POST_VARS[choice] is null). However, displaying
HTTP_GET_VARS[choice] does display yes. Running phpinfo() displays
that the REQUEST_METHOD = GET. Why is this GET and how do I get it set
to POST? How do I get HTTP_POST_VARS to work since my form does have
method=post?

Here are some php.ini settings (I'm running PHP 4.1.1 with Apache 1.3.22

under Win98):

variables_order = EGPCS
register_globals = On
register_argc_argv = On
gpc_order = GPC

Thanks...

Eurico
[EMAIL PROTECTED]


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




Re: [PHP] HTTP_POST_VARS problem

2002-02-07 Thread ejfs

Please ignore my question - I just figured it out. I had the method=post
in the input type=submit tag rather than in the form tag. It works!

However, if one has an HTML select/option menu scrolling list with multiple
selections, how does one get the number of values for the same name with
HTTP_POST_VARS? Or how does one scroll through the list of choices passed?
Thanks,

Eurico

[EMAIL PROTECTED] wrote:

 Hi. I'm a newbie at this and am having problems understanding how this
 works.

 I have a form with method=post. The server program does display
 REQUEST_STRING as I expect (e.g., choice=yes but displaying
 HTTP_POST_VARS[choice] is null). However, displaying
 HTTP_GET_VARS[choice] does display yes. Running phpinfo() displays
 that the REQUEST_METHOD = GET. Why is this GET and how do I get it set
 to POST? How do I get HTTP_POST_VARS to work since my form does have
 method=post?

 Here are some php.ini settings (I'm running PHP 4.1.1 with Apache 1.3.22

 under Win98):

 variables_order = EGPCS
 register_globals = On
 register_argc_argv = On
 gpc_order = GPC

 Thanks...

 Eurico
 [EMAIL PROTECTED]

 --
 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