Re: [PHP] Problem with the post variables.

2003-08-23 Thread chris
On Mon, 18 Aug 2003 18:35:09 +0200, Wouter Van Vliet [EMAIL PROTECTED] 
wrote:

The problem is probably in the 'enctype=multipart/form-data'. You 
should
only use this enctype if you're gonna upload a file through the form. If
not, just leave it away or use text/plain

Wouter
Why would that be the problem?  Regardless of the enctype, it should still 
create POST/GET data for whatever else was in the form.  Yes, 
multipart/form-data *should* only be used if they are uploading a file.  
That doesn't mean PHP should ignore additional POST/GET data from the 
form, which it has had a history of doing, depending on which way the wind 
blows or the price of tea in China.

-Oorspronkelijk bericht-
Van: Klaus Kaiser Apolinário [mailto:[EMAIL PROTECTED]
Verzonden: maandag 18 augustus 2003 16:04
Aan: [EMAIL PROTECTED]
Onderwerp: [PHP] Problem with the post variables.
Guys I have a problem here.
I'm using PHP 4.3.2 and httpd 1.3.28.
Look my exemple.
I have a page whith a Form method post, and I submit this page to
teste2.php, but I dont can request de data from the text box...
###
This is the test page
html
body
form action=teste2.php method=post enctype=multipart/form-data
input type=text name=texto
input type=submit value=ok
/form
/body
/html
#
Teste2.php
?php
$string = $_POST['texto'];
echo Var em post: .$string.br;
echo Var em get: .$_GET['texto'].br;
//phpinfo();
?

Some one can help me...???

Klaus Kaiser Apolinário
Curitiba online



--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Problem with the post variables.

2003-08-23 Thread Jim Lucas
You  need to take a second look at the way you are refering to the
varialbles in the process page.

You are using the POST method in the method='POST' in the form, but on the
process page you are refering to it via $_GET['...']  change this to
$_POST['...'] and you should be fine.

Jim Lucas
- Original Message - 
From: chris [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, August 23, 2003 1:34 PM
Subject: Re: [PHP] Problem with the post variables.


 On Mon, 18 Aug 2003 18:35:09 +0200, Wouter Van Vliet [EMAIL PROTECTED]
 wrote:

  The problem is probably in the 'enctype=multipart/form-data'. You
  should
  only use this enctype if you're gonna upload a file through the form. If
  not, just leave it away or use text/plain
 
  Wouter

 Why would that be the problem?  Regardless of the enctype, it should still
 create POST/GET data for whatever else was in the form.  Yes,
 multipart/form-data *should* only be used if they are uploading a file.
 That doesn't mean PHP should ignore additional POST/GET data from the
 form, which it has had a history of doing, depending on which way the wind
 blows or the price of tea in China.

  -Oorspronkelijk bericht-
  Van: Klaus Kaiser Apolinário [mailto:[EMAIL PROTECTED]
  Verzonden: maandag 18 augustus 2003 16:04
  Aan: [EMAIL PROTECTED]
  Onderwerp: [PHP] Problem with the post variables.
 
 
  Guys I have a problem here.
  I'm using PHP 4.3.2 and httpd 1.3.28.
  Look my exemple.
  I have a page whith a Form method post, and I submit this page to
  teste2.php, but I dont can request de data from the text box...
 
 
  ###
  This is the test page
 
  html
  body
  form action=teste2.php method=post enctype=multipart/form-data
  input type=text name=texto
  input type=submit value=ok
  /form
  /body
  /html
 
  #
  Teste2.php
 
  ?php
  $string = $_POST['texto'];
  echo Var em post: .$string.br;
  echo Var em get: .$_GET['texto'].br;
 
 
  //phpinfo();
  ?
  
 
  Some one can help me...???
 
  Klaus Kaiser Apolinário
  Curitiba online
 
 



 -- 
 Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

 -- 
 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] Problem with the post variables.

2003-08-18 Thread Klaus Kaiser Apolinário
Guys I have a problem here.
I'm using PHP 4.3.2 and httpd 1.3.28.
Look my exemple.
I have a page whith a Form method post, and I submit this page to teste2.php, but I 
dont can request de data from the text box...


###
This is the test page

html
body
form action=teste2.php method=post enctype=multipart/form-data
input type=text name=texto
input type=submit value=ok
/form
/body
/html

#
Teste2.php

?php
$string = $_POST['texto'];
echo Var em post: .$string.br;
echo Var em get: .$_GET['texto'].br;


//phpinfo();
?


Some one can help me...???

Klaus Kaiser Apolinário
Curitiba online

Re: [PHP] Problem with the post variables.

2003-08-18 Thread Hidayet Dogan
Check your register_globals directive in php.ini file.

If its value is Off, change your register_globals directive to On, and
restart your web server.

Or add ini_set(register_globals, 1); line top of your php file.

 Hidayet Dogan
  [EMAIL PROTECTED]

Pleksus Bilisim Teknolojileri D.T.O. A.S.
--
caldiran sok. 14/6 06420 kolej ankara * www.pleksus.com.tr
tel : +90 312 4355343 * faks: +90 312 4354006

On Mon, 18 Aug 2003, [iso-8859-1] Klaus Kaiser Apolinário wrote:

 Guys I have a problem here.
 I'm using PHP 4.3.2 and httpd 1.3.28.
 Look my exemple.
 I have a page whith a Form method post, and I submit this page to teste2.php, but I 
 dont can request de data from the text box...


 ###
 This is the test page

 html
 body
 form action=teste2.php method=post enctype=multipart/form-data
 input type=text name=texto
 input type=submit value=ok
 /form
 /body
 /html

 #
 Teste2.php

 ?php
 $string = $_POST['texto'];
 echo Var em post: .$string.br;
 echo Var em get: .$_GET['texto'].br;


 //phpinfo();
 ?
 

 Some one can help me...???

 Klaus Kaiser Apolinário
 Curitiba online


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



Re: [PHP] Problem with the post variables.

2003-08-18 Thread CPT John W. Holmes
Wow... don't do either of those. First of all, you can't use ini_set to
affect the register global settings and you're using the $_POST/$_GET
superglobals, which work regardless of your setting. So that's not the
issue.

Does the phpinfo() function product any output? What if you view the source
of the php file, do you see your PHP code?

---John Holmes...

- Original Message - 
From: Hidayet Dogan [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, August 18, 2003 10:47 AM
Subject: Re: [PHP] Problem with the post variables.


Check your register_globals directive in php.ini file.

If its value is Off, change your register_globals directive to On, and
restart your web server.

Or add ini_set(register_globals, 1); line top of your php file.

 Hidayet Dogan
  [EMAIL PROTECTED]

Pleksus Bilisim Teknolojileri D.T.O. A.S.
--
caldiran sok. 14/6 06420 kolej ankara * www.pleksus.com.tr
tel : +90 312 4355343 * faks: +90 312 4354006

On Mon, 18 Aug 2003, [iso-8859-1] Klaus Kaiser Apolinário wrote:

 Guys I have a problem here.
 I'm using PHP 4.3.2 and httpd 1.3.28.
 Look my exemple.
 I have a page whith a Form method post, and I submit this page to
teste2.php, but I dont can request de data from the text box...


 ###
 This is the test page

 html
 body
 form action=teste2.php method=post enctype=multipart/form-data
 input type=text name=texto
 input type=submit value=ok
 /form
 /body
 /html

 #
 Teste2.php

 ?php
 $string = $_POST['texto'];
 echo Var em post: .$string.br;
 echo Var em get: .$_GET['texto'].br;


 //phpinfo();
 ?
 

 Some one can help me...???

 Klaus Kaiser Apolinário
 Curitiba online


-- 
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] Problem with the post variables.

2003-08-18 Thread Wouter van Vliet
The problem is probably in the 'enctype=multipart/form-data'. You should
only use this enctype if you're gonna upload a file through the form. If
not, just leave it away or use text/plain

Wouter

-Oorspronkelijk bericht-
Van: Klaus Kaiser Apolinário [mailto:[EMAIL PROTECTED]
Verzonden: maandag 18 augustus 2003 16:04
Aan: [EMAIL PROTECTED]
Onderwerp: [PHP] Problem with the post variables.


Guys I have a problem here.
I'm using PHP 4.3.2 and httpd 1.3.28.
Look my exemple.
I have a page whith a Form method post, and I submit this page to
teste2.php, but I dont can request de data from the text box...


###
This is the test page

html
body
form action=teste2.php method=post enctype=multipart/form-data
input type=text name=texto
input type=submit value=ok
/form
/body
/html

#
Teste2.php

?php
$string = $_POST['texto'];
echo Var em post: .$string.br;
echo Var em get: .$_GET['texto'].br;


//phpinfo();
?


Some one can help me...???

Klaus Kaiser Apolinário
Curitiba online



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



RE: [PHP] Problem with the post variables.

2003-08-18 Thread Chris Shiflett
--- Wouter van Vliet [EMAIL PROTECTED] wrote:
 The problem is probably in the 'enctype=multipart/form-data'.
 You should only use this enctype if you're gonna upload a file
 through the form. If not, just leave it away or use text/plain

Posted data isn't text/plain, it's something like
application/x-www-form-urlencoded.

For the original poster, find a simple example and build on that rather than
trying to learn too many things at once. This might be a good start:

form method=post
input type=text name=foo /br /
input type=submit /
/form
p$_POST array:/p
pre
? print_r($_POST); ?
/pre

Hope that helps.

Chris

=
Become a better Web developer with the HTTP Developer's Handbook
http://httphandbook.org/

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



RE: [PHP] Problem with the post variables.

2003-08-18 Thread Wouter van Vliet
ooops .. my mistake .. Usually I check thing before I post, forget it
once .. that's how I make mistakes.. Anyways, I still am pretty sure setting
enctype to multipart/form-data was the problem..

'application/x-www-form-urlencoded' is indeed the correct enctype for just
posting forms .. (checked it at www.handleidinghtml.nl, interesting for the
fellow dutchmen over here ;))

-Oorspronkelijk bericht-
Van: Chris Shiflett [mailto:[EMAIL PROTECTED]
Verzonden: maandag 18 augustus 2003 19:09
Aan: Wouter van Vliet; Klaus_Kaiser_Apolinario;
[EMAIL PROTECTED]
Onderwerp: RE: [PHP] Problem with the post variables.


--- Wouter van Vliet [EMAIL PROTECTED] wrote:
 The problem is probably in the 'enctype=multipart/form-data'.
 You should only use this enctype if you're gonna upload a file
 through the form. If not, just leave it away or use text/plain

Posted data isn't text/plain, it's something like
application/x-www-form-urlencoded.

For the original poster, find a simple example and build on that rather than
trying to learn too many things at once. This might be a good start:

form method=post
input type=text name=foo /br /
input type=submit /
/form
p$_POST array:/p
pre
? print_r($_POST); ?
/pre

Hope that helps.

Chris

=
Become a better Web developer with the HTTP Developer's Handbook
http://httphandbook.org/



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



Re: [PHP] Problem with the post variables.

2003-08-18 Thread Tom Rogers
Hi,

Tuesday, August 19, 2003, 12:03:51 AM, you wrote:
KKA Guys I have a problem here.
KKA I'm using PHP 4.3.2 and httpd 1.3.28.
KKA Look my exemple.
KKA I have a page whith a Form method post, and I submit this page to teste2.php, but 
I dont can request de data from the text box...


KKA ###
KKA This is the test page

KKA html
KKA body
KKA form action=teste2.php method=post enctype=multipart/form-data
KKA input type=text name=texto
KKA input type=submit value=ok
KKA /form
KKA /body
KKA /html

KKA #
KKA Teste2.php

KKA ?php
KKA $string = $_POST['texto'];
KKA echo Var em post: .$string.br;
KKA echo Var em get: .$_GET['texto'].br;


KKA //phpinfo();
?
KKA 

KKA Some one can help me...???

KKA Klaus Kaiser Apolinário
KKA Curitiba online

is your second page Teste2.php or teste2.php ?

if Teste2.php it wont match your form declaration otherwise there is
nothing wrong with the code.

-- 
regards,
Tom


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