Re: Can't pass variables to PHP scripts?! Please help.

From: Date: Tue, 05 Feb 2002 14:47:05 +0000
Subject: Re: Can't pass variables to PHP scripts?! Please help.
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-11850@lists.php.net to get a copy of this message
If you will notice, your error is just a warning. If you go to your PHP.ini file, you should verify that you have the line: error_reporting = E_ALL & ~E_NOTICE as your type of error reporting. If you have warnings enabled, you will always get warnings of your vars not being initialized with some value (even though it is through the GET var). And, as someone else suggested, make sure you have register globals on, which is default in php 4.0.3 and higher. Hope that is of help. ~nicole amashta www.aeontrek.com "Travis Wyatt" <hyprlite@sonic.net> wrote in message news:1103_1012805478@news.php.net... > Here is my situation...I can't seem to get variables to pass from a GET or POST method to a PHP script. To see for yourself go to: > http://www.socopc.com/test.php?testvar=hello_world > > The source of "test.php" is... > <html> > <? for ($x=0;$x<5;$x++) { echo $x; } ?> > <br><? print "testvar=\"".$testvar."\""; ?> > <br><br><br><? phpinfo(); ?> > </html> > > > And as you will see, I get the error. > Warning: Undefined variable: testvar in c:\root\domains\socopc.com\test.php on line 3 > testvar="" > > Indicating that the variable is empty and has not been passed?! > I'm running Win2k Server w/ Apache and PHP 4.1.1. > > If someone could look at that page (included are most of my settings). And help me fix my PHP configuration? Thanks! > ~ Travis > >

« previous php.windows (#11850) next »