Re: [PHP] global variable does not exist anymore?

2007-08-01 Thread Patrik Hasibuan
Thank you very much. === On Fri, 27 Jul 2007 00:26:24 -0500 (CDT) "Richard Lynch" <[EMAIL PROTECTED]> wrote: > It's register_globals, and you should fix this ancient script to not > rely on register_globals being "on" > > On Wed, July 25, 2007 5:30 pm, Patrik Hasibuan wrote: > > Dear my friends..

Re: [PHP] global variable does not exist anymore?

2007-08-01 Thread Patrik Hasibuan
OK, Thanks Richards. === On Wed, 25 Jul 2007 23:54:37 +0100 Richard Davey <[EMAIL PROTECTED]> wrote: > Hi Patrik, > > Wednesday, July 25, 2007, 11:30:56 PM, you wrote: > > > Dear my friends... > > > I create a very simple script in html and php as a first step. I use suse, > > apache2, mysql a

Re: [PHP] global variable does not exist anymore?

2007-07-26 Thread Richard Lynch
It's register_globals, and you should fix this ancient script to not rely on register_globals being "on" On Wed, July 25, 2007 5:30 pm, Patrik Hasibuan wrote: > Dear my friends... > > I create a very simple script in html and php as a first step. I use > suse, apache2, mysql and php. > > I wonder

Re: [PHP] global variable does not exist anymore?

2007-07-25 Thread Patrik Hasibuan
Hi Richard, You solved my problem. Thank you very...very much. === On Wed, 25 Jul 2007 23:54:37 +0100 Richard Davey <[EMAIL PROTECTED]> wrote: > Hi Patrik, > > Wednesday, July 25, 2007, 11:30:56 PM, you wrote: > > > Dear my friends... > > > I create a very simple script in html and php as a f

Re: [PHP] global variable does not exist anymore?

2007-07-25 Thread Richard Davey
Hi Patrik, Wednesday, July 25, 2007, 11:30:56 PM, you wrote: > Dear my friends... > I create a very simple script in html and php as a first step. I use suse, > apache2, mysql and php. > I wonder why this script does not work: > > > > > Guru - Virtual bookstore who understands you for

Re: [PHP] global variable declaration

2006-02-08 Thread Miles Thompson
At 10:46 AM 2/8/2006, suresh kumar wrote: hai, this is my sample code: i am having user table with SponsorID as one field in mysql database,this is my query; for($j=0;$j<5;$j++): $result=mysql_query("select * from user where SponsorID='$id[$j]' ")

RE: [PHP] global variable declaration

2006-02-08 Thread Jay Blanchard
[snip] for($j=0;$j<5;$j++): $result=mysql_query("select * from user where SponsorID='$id[$j]' "); endfor; in above code when i print mysql_num_rows($result) inside for loop its output is 5.when i print outside the for loop its o/p is 0.I searched weberdev.com website and dec

Re: [PHP] global variable declaration

2006-02-08 Thread Richard Davey
On 8 Feb 2006, at 14:46, suresh kumar wrote: this is my sample code: i am having user table with SponsorID as one field in mysql database,this is my query; for($j=0;$j<5;$j++): $result=mysql_query("select * from user where SponsorID='$id [$j]' "

Re: [PHP] Global variable question question

2003-07-23 Thread Curt Zirzow
* Thus wrote Jason Giangrande ([EMAIL PROTECTED]): > When registered globals is set to off this does not effect the $PHP_SELF > variable right? In other words I should be able to call $PHP_SELF with > out having to do this $_SERVER['PHP_SELF'], right? > register_globals has nothing to do with $P

Re: [PHP] Global variable question question

2003-07-23 Thread Jason Giangrande
Actually, I am running PHP 4.3.2 on a Gentoo Linux box with registered_globals set to Off and $PHP_SELF does work. The production box running Red Hat and PHP 4.3.0, with register_globals also set to Off, doesn't work using $PHP_SELF (as apparently it should), and this is why I was asking. Jason

Re: [PHP] Global variable question question

2003-07-23 Thread Lars Torben Wilson
On Wed, 2003-07-23 at 12:19, Jason Giangrande wrote: > When registered globals is set to off this does not effect the $PHP_SELF > variable right? In other words I should be able to call $PHP_SELF with > out having to do this $_SERVER['PHP_SELF'], right? > > Thanks, > Jason Giangrande Without goi

Re: [PHP] Global variable question question

2003-07-23 Thread CPT John W. Holmes
> When registered globals is set to off this does not effect the $PHP_SELF > variable right? In other words I should be able to call $PHP_SELF with > out having to do this $_SERVER['PHP_SELF'], right? No. With register_globals OFF, $PHP_SELF is not set. ---John Holmes... -- PHP General Mailin

RE: [PHP] Global variable

2002-04-17 Thread Vladislav Kulchitski
The best way for this is to use sessions. What you do is you check the identity and if it's valid you create a session with name 'validuser' or whatever the name you want. Then any secure operations/actions along the script you'll check for this session name if it exists. I can demonstrate how I

Re: [PHP] global variable for all scripts

2001-11-10 Thread Kurt Lieber
On Saturday 10 November 2001 01:29 pm, you wrote: > if i like to move my scripts to /www/my_newdir i habe to change the > include() function in every script A few options: 1. Don't use absolute paths -- use relative paths. Then you don't have to worry about it as long as the overall structure

Re: [PHP] global variable again?

2001-08-25 Thread Chris Hayes
Look in the manual: language.variables.scope.html 'global' is meant to use inside a function for accessing vars that are not in a function (the main part). > I use global in this form: > > global $a; > $a=strtotime('now'); > . > . > . > echo $a; but in this line dont echo $a Using globa