Re: [PHP] HTTP_POST_VARS truncated
> 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 - val is $v \n"; Thanks Jason I'll try it tonight, I'm not at my desk now. However, I would like to highlight that: 1) the select tags *are* inside the forms ones. I know php accepts all form fields, that's why I'm so puzzled... 2) I know that the code I posted here is wrong. In fact I said "something like..."; The code I put in the real PHP page however is correct, identical to what you write above, copied straight from a manual: the proof is that otherwise it would not have printed the other form fields as reported, right? Again, I'll try the reset instructino tonight and report. In the meantime any other hypothesis is welcome Thanks, mweb -- 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] HTTP_POST_VARS truncated
Thanks Jason & Jani!Both ur ways work! $loc = "..\files\poese.txt" $loc = "..\\files\\poese.txt" But another question that comes to mind is that why must i include the '..\' to move down to a sub-directory? I thought '..\' moves up a directory 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 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 - val is $v \n"; } > To test the http/php setup on one of my computers I wrote a > very simple html form, with two select fields, > two text fields, and the submit field. Pushing submit the > data are sent via POST method to an extremely simple PHP > page which only contains something like: > > foreach (var, key) in HTTP_POST_VARS { > > print "VAR: $var KEY = $key > } > > It works, (meaning that php code is correct, html output is displayed, > and no error are reported) but only prints three lines, i.e. the two select fields are missing. > Both the php and the html code are syntactically correct: I > double checked that on the books, just to be sure. > > It looks like the select fields, and them only, are not passed > to the form by the server, or that in some other way they never > make it into HTTP_POST_VARS. > > Any ideas? Setup is plain Red Hat 7.2 with its default apache/php > packages. > > TIA, > mweb > > > -- > 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] > > -- 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] -- 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] HTTP_POST_VARS truncated
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 - val is $v \n"; } > To test the http/php setup on one of my computers I wrote a > very simple html form, with two select fields, > two text fields, and the submit field. Pushing submit the > data are sent via POST method to an extremely simple PHP > page which only contains something like: > > foreach (var, key) in HTTP_POST_VARS { > > print "VAR: $var KEY = $key > } > > It works, (meaning that php code is correct, html output is displayed, > and no error are reported) but only prints three lines, i.e. the two select fields are missing. > Both the php and the html code are syntactically correct: I > double checked that on the books, just to be sure. > > It looks like the select fields, and them only, are not passed > to the form by the server, or that in some other way they never > make it into HTTP_POST_VARS. > > Any ideas? Setup is plain Red Hat 7.2 with its default apache/php > packages. > > TIA, > mweb > > > -- > 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] > > -- 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] HTTP_POST_VARS truncated
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_POST_VARS truncated Hello, To test the http/php setup on one of my computers I wrote a very simple html form, with two select fields, two text fields, and the submit field. Pushing submit the data are sent via POST method to an extremely simple PHP page which only contains something like: foreach (var, key) in HTTP_POST_VARS { print "VAR: $var KEY = $key } It works, (meaning that php code is correct, html output is displayed, and no error are reported) but only prints three lines, i.e. the two select fields are missing. Both the php and the html code are syntactically correct: I double checked that on the books, just to be sure. It looks like the select fields, and them only, are not passed to the form by the server, or that in some other way they never make it into HTTP_POST_VARS. Any ideas? Setup is plain Red Hat 7.2 with its default apache/php packages. TIA, mweb -- 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] -- 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]
[PHP] HTTP_POST_VARS truncated
Hello, To test the http/php setup on one of my computers I wrote a very simple html form, with two select fields, two text fields, and the submit field. Pushing submit the data are sent via POST method to an extremely simple PHP page which only contains something like: foreach (var, key) in HTTP_POST_VARS { print "VAR: $var KEY = $key } It works, (meaning that php code is correct, html output is displayed, and no error are reported) but only prints three lines, i.e. the two select fields are missing. Both the php and the html code are syntactically correct: I double checked that on the books, just to be sure. It looks like the select fields, and them only, are not passed to the form by the server, or that in some other way they never make it into HTTP_POST_VARS. Any ideas? Setup is plain Red Hat 7.2 with its default apache/php packages. TIA, mweb -- 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]