Hi
AH> Whats the advantage (or shall i say disadvantage )of passing form variables to a
function like shown below:
AH> function function_name($var,$var1,$var2)
AH> {
AH> }
AH> rather than passing the $HTTP_POST_VARS array to the fuction like:
AH> function function_name($HTTP_POST_VARS)
AH> {
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
ginal 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"
Thanks for all the replies. However, I still have problems as the following code
produces the following output:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
echo "0: " . $userfile . "";
echo "1: " . $HTTP_POST_FILES['userfile']['size'] . "";
echo "2: " . $HTTP_POST_FILES['userfil
--- "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\\Desk
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]
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
On Thursday, June 20, 2002, at 02:41 PM, Chris Sechiatano wrote:
> Just a simple question about the HTTP_POST_VARS. I know my forms will
> work
> if I use only the name of the input. Say a text box called FirstName.
> I
> can just do:
>
> print "$FirstName";
>
> and everything works fine. Wh
On Monday, April 22, 2002, at 12:19 PM, [EMAIL PROTECTED] wrote:
> HI ML
>
> Only one little question :
> I know that _POST doesn't exists on php 4.0.6 but does $HTTP_POST_VARS
> exist on php 4.1.2 ?
Yes, but you would have had an answer to this question 45 minutes ago if
you had just tried i
On Thu, 21 Mar 2002, Joshua E Minnie wrote:
> I need to access a variable on a form that allows multiples. I have to use
> $HTTP_POST_VARS so I need to know how to display the information obtained
> from the form. This is what I am using right now:
>
>reset($HTTP_POST_VARS["interest"]);
>
$interest = $HTTP_POST_VARS['interest'];
or (if using PHP 4.1)
$interest = $_POST['interest'];
then reference $interest[0], $interest[1], $interest[2],...
-Original Message-
From: Joshua E Minnie [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 21, 2002 11:54 AM
To: [EMAIL PROTECTED]
S
Make the name of the select an array
e.g. 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
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
HTT
> reset($HTTP_POST_VARS);
>
> at the begining of the code. if that doesn't work verify your html again.
> make sure the 's are between the form tag. php doesn't ignore
> certain form fields. =)
>
> i'm the habit of reading arrays like...
> while(list($k,$v) = each($HTTP_POST_VARS)) {
> echo "
ory tree!
This also works both ways :
$loc = "../files/poese.txt"
$loc = "..//files//poese.txt"
-Original Message-
From: Jason [mailto:[EMAIL PROTECTED]]
Sent: 30 November 2001 10:54
To: mweb; phplist
Subject: Re: [PHP] HTTP_POST_VARS truncated
try:
reset($HTTP_POST_VARS);
at
try:
reset($HTTP_POST_VARS);
at the begining of the code. if that doesn't work verify your html again.
make sure the 's are between the form tag. php doesn't ignore
certain form fields. =)
i'm the habit of reading arrays like...
while(list($k,$v) = each($HTTP_POST_VARS)) {
echo "key is $k -
I cannot compile this:
try that :
foreach ($HTTP_POST_VARS as $key => $var){
print "VAR: $var KEY = $key";
}
Regards,
Andrey Hristov
- Original Message -
From: "mweb" <[EMAIL PROTECTED]>
To: "phplist" <[EMAIL PROTECTED]>
Sent: Friday, November 30, 2001 10:03 AM
Subject: [PHP] HTTP_PO
On Mon, 26 Nov 2001, Martin Towell wrote:
> you said you tried a text field, have you tried a hidden field?
Alrighty then, my greenness shows. :)
The hidden field idea was perfect (never used one before).
Thank god I'm just playing around with my _own_ site. ;)
Thanks Martin!
Benny
~
you said you tried a text field, have you tried a hidden field?
does it HAVE to be in $HTTP_POST_VARS ?? can you append it to whatever link
you have using "?unique_id=$id" or something similar?
Martin T
-Original Message-
From: C. Bensend [mailto:[EMAIL PROTECTED]]
Sent: Monday, Novemb
Hi
This works (save as whatdo.php)
Whatdo
";
$row++;
endwhile;
else:
?>
Row Options
Load
Delete
Change Category
Name the form element without the brackets ... just "whatdo" instead of
"whatdo[]". When $whatdo[] makes it to your formhandler, it's an array.
(You _could_ access $whatdo[0] ... but that may or may not be more
confusing.)
~Chris /"\
Just an addendum, I changed it from radio buttons to a pop up menu
Load
Delete
Change Category
Again, if I print_r (HTTP_POST_VARS), I can see the Array ( [whatdo] =>
Array ( [0] => load [1] => delete), [other
s
My bad for typing it in from memory. I'd retyped it in a few times, so I
thought i had it perfect. Here's the exact code:
print_r ($HTTP_POSTVARS); // yeilds the array that I pasted down below
if ($flag=="process")
{
$whatdo = $HTTP_POSTVARS['whatdo'];
print_r($what_do); // blank
.
.
.
for (
Hi
Your whatdo's will be whatdo0 whatdo1...whatdox
You need to do like this if I understand what you are doing :)
$row=0;
while($row < $numofrows):
$var = "whatdo".$row;
$whatdo = $submitted_vars["$var"];
//do whatever with $whatdo
.
$row ++;
endwhile;
Tom
At 09:41 AM 10/11/01, La
On Fri, 9 Nov 2001, Lara J. Fabans wrote:
> The original form has a table where each row has a set of 3 radio
> buttons name="whatdo[]" where $x is the row counter.
Well, for a set of raido buttons, they should all have the same name.
In your case, all 3 radio buttons should be named "whatdo"
something like this...
if( sizeof( $HTTP_POST_VARS ) > 0 ){ // avoid error when no vars
while ( list ( $key, $val ) = each ( $HTTP_POST_VARS )) {
print "$key = $val";
}
}
py
- Original Message -
From: "Andy Ladouceur" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent:
Thanks!
-Andy
Jason Murray <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > I am wondering if there is a command or function to get a
> > list of all the current '$HTTP_POST_VARS["variable"]' variables?
> > Or, a user-created way... Any helps appreciated, thank
Ah, its that simple?
-feels likea bit of an idiot-
Thanks for the help!
Tim <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> while (list($k,$v) = each($HTTP_POST_VARS)) {
> echo "$k = $v";
> }
>
> On Mon, 2001-08-27 at 21:48, Andy Ladouceur wrote:
> > Hello all
> I am wondering if there is a command or function to get a
> list of all the current '$HTTP_POST_VARS["variable"]' variables?
> Or, a user-created way... Any helps appreciated, thanks!
You can use var_dump($HTTP_POST_VARS);
Jason
--
PHP General Mailing List (http://www.php.net/)
To unsubscr
while (list($k,$v) = each($HTTP_POST_VARS)) {
echo "$k = $v";
}
On Mon, 2001-08-27 at 21:48, Andy Ladouceur wrote:
> Hello all,
> I am wondering if there is a command or function to get a list of all the
> current '$HTTP_POST_VARS["variable"]' variables? Or, a user-created way...
> Any h
"Tom Beidler" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I have a form with approximately 40 input fields. When a form is posted it
> sends an email and then builds a tab delimited $txt entry for a text file
on
> the server.
>
> The problem is that if a ch
The thing can do is as follows:
When i want check such empty boxes, i call up the $HTTP_POST_VARS just like
you. BUT what i do next ist that while listing those vars i insert an if
statement like
if (!strstr($key,checkbox_name)) {echo ($error);}
So i do a stringmatch with the key and the name..
y
Cc: 'Tom Beidler'; [EMAIL PROTECTED]
Subject: RE: [PHP] HTTP_POST_VARS not picking up checkboxes that are
unche cked
I had some issues with that recently. It turns out that PHP will not
pick up the checkboxes, unless you use the GET method.
You can then access your var
I had some issues with that recently. It turns out that PHP will not
pick up the checkboxes, unless you use the GET method.
You can then access your vars with HTTP_GET_VARS.
This was discovered on
WIN98+ PHP 4.03pl1 + Apache 1.3++
&
WIN ME + PHP 4.03pl1 + Apache 1.3++
> The problem is that if a checkbox is not checked, when it's not required, I
> don't get a blank entry in my tab file for the checkbox input. I'm imploding
> my HTTP_POST_VARS variable like so;
This has nothing to do with PHP. Your browser sends nothing for an
unchecked checkbox. You would hav
> Subject: [PHP] HTTP_POST_VARS not picking up checkboxes that are unchecked
That's right - if the checkbox isn't checked the browser doesn't send it.
Jason
Quick answer: HTTP_POST_VARS is an associative array. The "name" of the
submitted variables are the keys, and the value of the element is the value
that was submitted.
--
Plutarck
Should be working on something...
...but forgot what it was.
""Mat Marlow"" <[EMAIL PROTECTED]> wrote in message
9
Mat Marlow wrote:
>
> Hi,
> Does anyone know if php stores POST variable names as well as values? I'm
> using HTTP_POST_VARS for the values but I'm having to create my own array
> for the names.
>
> cheers,
>
> Mat
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mai
Hi,
this will list all your posted variables with name and
the posted value.
while (list($key, $value)=each($HTTP_POST_VARS) ) {
echo "$key = $value ";
}
Johannes
""Mat Marlow"" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
9bk11q$dvq$[EMAIL PROTECTED]">news:9bk11q$dvq$[EMAIL PROTECTE
So sprach Joseph Blythe am Wed, Apr 18, 2001 at 10:48:14AM +0930:
> Hey,
>
> Why doesn't HTTP_POST_VARS work inside functions?
>
> ---somefile.php - forms action ---
>
> function foo() {
>reset($HTTP_POST_VARS);
Because this particular HTTP_POST_VARS is not the HTTP_POST_VARS you have
Rasmus Lerdorf wrote:
> It is a normal global variable. Like all other global variables you need
> to declare the fact that you want the global variable inside a function.
> Simply put: global $HTTP_POST_VARS; at the top of your function and it
> will work just fine.
>
> Read the section on var
> I thought the above would work but it returns the following error(s):
>
> ... value passed to reset is not an array or object ...
> ... value passed to each is not an array or object ...
>
> It seems that HTTP_POST_VARS does not like being called from inside
> functions, as the above will work
At 4:50 PM +0200 4/12/01, Dominick Vansevenant <[EMAIL PROTECTED]> wrote:
>Mat,
>
>did you put in a reset?
>
>reset($HTTP_POST_VARS);
>
>D.
Yes, you'll need the reset() there if you're looping through the
$HTTP_POST_VARS array more than once. However:
I take it that you were trying something l
Try doing a print_r in the place where you are trying to print data.
So you can see if a second dimension slipped in there, or if there is some
other problem.
I know that the post/get vars are always associative arrays, but I assume
refering to them by their numeric keys should work...don't see
Mat,
did you put in a reset?
reset($HTTP_POST_VARS);
D.
-Original Message-
From: Mat Marlow [mailto:[EMAIL PROTECTED]]
Sent: donderdag 12 april 2001 16:49
To: [EMAIL PROTECTED]
Subject: [PHP] HTTP_POST_VARS
Hi all,
I'm having trouble retrieving data from $HTTP_POST_VARS. Whenever I t
Check your browser settings, I had this problem when I had the 'check
page never' setting selected, and it went away when I set it to 'check
every session'
>I am having a similar problem as the original poster. In my case, I _want_
>the second sumbission to overwrite the first, but it's not happ
I am having a similar problem as the original poster. In my case, I _want_
the second sumbission to overwrite the first, but it's not happening. What
I have is a radio button list all named="update" each with it's own value
(ie. 2,3,4,5,etc.). The form is self-submitting and tests on 'update' t
No.
Check box and radio buttons are not set, though.
Regards,
--
Yasuo Ohgaki
""stas"" <[EMAIL PROTECTED]> wrote in message
026001c07cc4$aeaa6250$9701a8c0@snewdel">news:026001c07cc4$aeaa6250$9701a8c0@snewdel...
Hello,
Is it that correct that only non-empty variables get inserted into
HTTP_POS
Explained here:
http://www.php.net/manual/en/language.variables.external.php
Basically name the variables with []. For example:
In your example, the second is actually overwriting the first.
Nate
-Original Message-
From: mat t [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 08, 20
You're not setting a value for the first variable ie.."Name"
unless you put something in the text box to represent the variable
it will come across as empty.
Jerry Lake- [EMAIL PROTECTED]
Web Designer
Europa Communications - http://www.europa.com
Pacifier Online - http://www.pacif
http://php.net/FAQ.php
talks about HTTP_POST_VARS a little...
--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
- Original Message -
From: Augusto Cesa
51 matches
Mail list logo