Re: [PHP] Problem with postfield elements

2002-06-13 Thread Jason Wong

On Thursday 13 June 2002 14:18, Balaji Ankem wrote:
 Hi friend,
  Just now I have installed php 4.2.1 on my windows NT machine.

Did you read the release notes or the documentation which comes with it, or 
the manual even?

  Here I found I am not able to get the postfield values.
  What would be the reason?

register_globals is disabled. Read the manual or search the archives for more 
info.

   echo emp_id: .$emp_id;
   echo emp_pass:.$emp_pass;

Use :

  echo emp_id: .$_POST['emp_id'];

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

/*
The strong give up and move away, while the weak give up and stay.
*/


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




RE: [PHP] Problem with postfield elements

2002-06-13 Thread Balaji Ankem

Hi Jason,
 Thanks for the reply.

 Just I posted to input fields from a html form and I tried to print.

 Here I am not registering any global variables.

 I have tried echo emp_id: .$_POST['emp_id']; and able to print
succesfully.

 Every time I have to refer like this $_POST['emp_id']. Can't I refer as
$emp_id ?

Thanks and Regards
Balaji


-Original Message-
From: Jason Wong [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, June 13, 2002 12:15 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Problem with postfield elements


On Thursday 13 June 2002 14:18, Balaji Ankem wrote:
 Hi friend,
  Just now I have installed php 4.2.1 on my windows NT machine.

Did you read the release notes or the documentation which comes with it,
or 
the manual even?

  Here I found I am not able to get the postfield values.
  What would be the reason?

register_globals is disabled. Read the manual or search the archives for
more 
info.

   echo emp_id: .$emp_id;
   echo emp_pass:.$emp_pass;

Use :

  echo emp_id: .$_POST['emp_id'];

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

/*
The strong give up and move away, while the weak give up and stay. */


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



**Disclaimer

Information contained in this E-MAIL being proprietary to Wipro Limited is 
'privileged' and 'confidential' and intended for use only by the individual
 or entity to which it is addressed. You are notified that any use, copying 
or dissemination of the information contained in the E-MAIL in any manner 
whatsoever is strictly prohibited.

***



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


RE: [PHP] Problem with postfield elements

2002-06-13 Thread Balaji Ankem

Hi Justin ,
Thankyou. They made this change in php 4.2.1 only?? 
But I never faced this problem previously with php3, php 4.0.1.
Is it like that?

Thanks and Regards
Balaji


-Original Message-
From: Justin French [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, June 13, 2002 12:44 PM
To: Balaji Ankem
Subject: Re: [PHP] Problem with postfield elements


on 13/06/02 4:50 PM, Balaji Ankem ([EMAIL PROTECTED]) wrote:

 Every time I have to refer like this $_POST['emp_id']. Can't I refer 
 as $emp_id ?

Yes, partly.

1. you can always turn register globals back ON, but there is a reason
(security) why they are now off by default.  In short, if you know WHERE
the var is coming from (eg POST), things should be more secure.  (eg, if
I can do something like foo.php?is_user=yes on your URL, it might have
bad consequences, but if you ONLY trust a $_COOKIE['is_user'], then the
script is already more secure.

2. at the top of the script, you can put in $emp_id = $_POST['emp_id'];


Regards,

Justin French



**Disclaimer

Information contained in this E-MAIL being proprietary to Wipro Limited is 
'privileged' and 'confidential' and intended for use only by the individual
 or entity to which it is addressed. You are notified that any use, copying 
or dissemination of the information contained in the E-MAIL in any manner 
whatsoever is strictly prohibited.

***



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


Re: [PHP] Problem with postfield elements

2002-06-13 Thread Jason Wong

On Thursday 13 June 2002 16:06, Balaji Ankem wrote:
 Hi Justin ,
 Thankyou. They made this change in php 4.2.1 only??
 But I never faced this problem previously with php3, php 4.0.1.
 Is it like that?

Since 4.1.X. 

This issue comes with monotonous regularity (probably once a day). It is 
explained in the release notes, the manual, and has been covered many, many 
times on the list. Please refer to the documentation or search the list 
archives.

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

/*
Carson's Consolation:
Nothing is ever a complete failure.
It can always be used as a bad example.
*/


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