Re: [PHP] POST and GET variables don't work

2002-10-13 Thread Jennifer Swofford

BTW, disregard my comment about GET... I confused myself.  Zzz.

Jen


 Try:

 $_Post[name];

 or $HTTP_POST_VARS[name];

 In new PHP version, register_globals is set to off by default, which is
 why $name isn't working for you.  Although, I'm surprised GET isn't
 working

 Jen


  I've just built PHP from source (4.2.3) on Red Hat Linux 7.2 with
 
  configure --with-java --with-apxs=/usr/local/apache/bin/apx
 
  It's running with Apache 1.3.26
 
  PHP work ok, even Java works, but if I try to pass variables from a form
  with either POST or GET, the variables don't get through.  This is the
 code
  I'm using:
 
  index.html:
  ...
  form action=php.php method=post
   Name: input type=text name=namebr
input type=submit
/form
  ...
 
  php.php:
 
  ?php
  echo *;
  echo $name;
  echo *;
  ?
 
  The variable $name is always empty.  I tried this same scripts on the
RPM
  version installed with Mandrake 7.2 and it worked fine, so it shouldn't
be
  the scripts.  What could be wrong? Maybe I missed a ./configure option?
 
  Thanks in advance,
 
 
  Andres




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




Re: [PHP] POST and GET variables don't work

2002-10-13 Thread Oscar F

Most likely you have register_globals set to off on your php.ini. 
Change this to register_globals = on (or true, or yes, either one 
should).

If you dont want to do that, Try with $_GET['name'] or $_POST['name'].

HTH.

   Oscar F.-

Andres Olarte wrote:

 
 
 
 I've just built PHP from source (4.2.3) on Red Hat Linux 7.2 with
 
 configure --with-java --with-apxs=/usr/local/apache/bin/apx
 
 It's running with Apache 1.3.26
 
 PHP work ok, even Java works, but if I try to pass variables from a form 
 with either POST or GET, the variables don't get through.  This is the 
 code I'm using:
 
 index.html:
 ...
 form action=php.php method=post
 Name: input type=text name=namebr
  input type=submit
  /form
 ...
 
 php.php:
 
 ?php
 echo *;
 echo $name;
 echo *;
 ?
 
 The variable $name is always empty.  I tried this same scripts on the 
 RPM version installed with Mandrake 7.2 and it worked fine, so it 
 shouldn't be the scripts.  What could be wrong? Maybe I missed a 
 ./configure option?
 
 Thanks in advance,
 
 
 Andres
 
 
 
 _
 Únase al mayor servicio mundial de correo electrónico: 
 http://www.hotmail.com/es
 
 



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




[PHP] POST and GET variables don't work

2002-10-13 Thread Andres Olarte




I've just built PHP from source (4.2.3) on Red Hat Linux 7.2 with

configure --with-java --with-apxs=/usr/local/apache/bin/apx

It's running with Apache 1.3.26

PHP work ok, even Java works, but if I try to pass variables from a form 
with either POST or GET, the variables don't get through.  This is the code 
I'm using:

index.html:
...
form action=php.php method=post
 Name: input type=text name=namebr
  input type=submit
  /form
...

php.php:

?php
echo *;
echo $name;
echo *;
?

The variable $name is always empty.  I tried this same scripts on the RPM 
version installed with Mandrake 7.2 and it worked fine, so it shouldn't be 
the scripts.  What could be wrong? Maybe I missed a ./configure option?

Thanks in advance,


Andres



_
Únase al mayor servicio mundial de correo electrónico: 
http://www.hotmail.com/es


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




Re: [PHP] POST and GET variables don't work

2002-10-13 Thread Jennifer Swofford

Try:

$_Post[name];

or $HTTP_POST_VARS[name];

In new PHP version, register_globals is set to off by default, which is
why $name isn't working for you.  Although, I'm surprised GET isn't
working

Jen


 I've just built PHP from source (4.2.3) on Red Hat Linux 7.2 with

 configure --with-java --with-apxs=/usr/local/apache/bin/apx

 It's running with Apache 1.3.26

 PHP work ok, even Java works, but if I try to pass variables from a form
 with either POST or GET, the variables don't get through.  This is the
code
 I'm using:

 index.html:
 ...
 form action=php.php method=post
  Name: input type=text name=namebr
   input type=submit
   /form
 ...

 php.php:

 ?php
 echo *;
 echo $name;
 echo *;
 ?

 The variable $name is always empty.  I tried this same scripts on the RPM
 version installed with Mandrake 7.2 and it worked fine, so it shouldn't be
 the scripts.  What could be wrong? Maybe I missed a ./configure option?

 Thanks in advance,


 Andres




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




Re: [PHP] POST and GET variables don't work

2002-10-13 Thread Sascha Cunz

Am Sonntag, 13. Oktober 2002 02:11 schrieb Andres Olarte:
 Thanks to Oscar and Jennifer, it's working now.  I did a bit of reading,
 and it seems it's not recommend to enable register_globlas, why is that?

For security...

Imagine, you register a session variable to contain the user's ID. Anyone 
could login using that ID in a GET or POST variable with register_globals to 
on.

-Sascha

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




Re: [PHP] POST and GET variables don't work

2002-10-13 Thread Andres Olarte

Thanks to Oscar and Jennifer, it's working now.  I did a bit of reading, and 
it seems it's not recommend to enable register_globlas, why is that?

Is there an array that contains both POST and GET variables or am I stuck to 
using two different ones?




From: Oscar F [EMAIL PROTECTED]
To: Andres Olarte [EMAIL PROTECTED],php-general 
[EMAIL PROTECTED]
Subject: Re: [PHP] POST and GET variables don't work
Date: Sat, 12 Oct 2002 19:58:04 -0400

Most likely you have register_globals set to off on your php.ini. Change 
this to register_globals = on (or true, or yes, either one should).

If you dont want to do that, Try with $_GET['name'] or $_POST['name'].

HTH.

   Oscar F.-

Andres Olarte wrote:




I've just built PHP from source (4.2.3) on Red Hat Linux 7.2 with

configure --with-java --with-apxs=/usr/local/apache/bin/apx

It's running with Apache 1.3.26

PHP work ok, even Java works, but if I try to pass variables from a form 
with either POST or GET, the variables don't get through.  This is the 
code I'm using:

index.html:
...
form action=php.php method=post
 Name: input type=text name=namebr
  input type=submit
  /form
...

php.php:

?php
echo *;
echo $name;
echo *;
?

The variable $name is always empty.  I tried this same scripts on the RPM 
version installed with Mandrake 7.2 and it worked fine, so it shouldn't be 
the scripts.  What could be wrong? Maybe I missed a ./configure option?

Thanks in advance,


Andres



_
Únase al mayor servicio mundial de correo electrónico: 
http://www.hotmail.com/es






_
MSN Fotos: la forma más fácil de compartir e imprimir fotos. 
http://photos.msn.es/support/worldwide.aspx


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




RE: [PHP] POST and GET variables don't work

2002-10-13 Thread John W. Holmes

$_REQUEST[] (also contains cookies)

---John Holmes...

 -Original Message-
 From: Andres Olarte [mailto:[EMAIL PROTECTED]]
 Sent: Saturday, October 12, 2002 8:11 PM
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: Re: [PHP] POST and GET variables don't work
 
 Thanks to Oscar and Jennifer, it's working now.  I did a bit of
reading,
 and
 it seems it's not recommend to enable register_globlas, why is that?
 
 Is there an array that contains both POST and GET variables or am I
stuck
 to
 using two different ones?
 
 
 
 
 From: Oscar F [EMAIL PROTECTED]
 To: Andres Olarte [EMAIL PROTECTED],php-general
 [EMAIL PROTECTED]
 Subject: Re: [PHP] POST and GET variables don't work
 Date: Sat, 12 Oct 2002 19:58:04 -0400
 
 Most likely you have register_globals set to off on your php.ini.
 Change
 this to register_globals = on (or true, or yes, either one
should).
 
 If you dont want to do that, Try with $_GET['name'] or
$_POST['name'].
 
 HTH.
 
Oscar F.-
 
 Andres Olarte wrote:
 
 
 
 
 I've just built PHP from source (4.2.3) on Red Hat Linux 7.2 with
 
 configure --with-java --with-apxs=/usr/local/apache/bin/apx
 
 It's running with Apache 1.3.26
 
 PHP work ok, even Java works, but if I try to pass variables from a
form
 with either POST or GET, the variables don't get through.  This is
the
 code I'm using:
 
 index.html:
 ...
 form action=php.php method=post
  Name: input type=text name=namebr
   input type=submit
   /form
 ...
 
 php.php:
 
 ?php
 echo *;
 echo $name;
 echo *;
 ?
 
 The variable $name is always empty.  I tried this same scripts on
the
 RPM
 version installed with Mandrake 7.2 and it worked fine, so it
shouldn't
 be
 the scripts.  What could be wrong? Maybe I missed a ./configure
option?
 
 Thanks in advance,
 
 
 Andres
 
 
 
 _
 Únase al mayor servicio mundial de correo electrónico:
 http://www.hotmail.com/es
 
 
 
 
 
 
 _
 MSN Fotos: la forma más fácil de compartir e imprimir fotos.
 http://photos.msn.es/support/worldwide.aspx
 
 
 --
 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