Vriables via URL

From: Date: Wed, 30 Oct 2002 19:13:45 +0000
Subject: Vriables via URL
Groups: php.windows 
Request: Send a blank email to php-windows+get-16652@lists.php.net to get a copy of this message
I've recently installed PHP4 with my Apache 1.3.27 (Windows XP) and I've noticed some problems like the variables specified via URL being ignored. http://127.0.0.1/teste.php?X=1 with teste.php: <?php echo $X ?> returns: Notice: Undefined variable: X in f:\http\htdocs\teste.php on line 1 An example of another problem is that it doesn't know PHP_SELF. <html><body> <?php if ( $a ) { print( "a = $a" ); } else { // Form entry: print( "<form action=\"$PHP_SELF\" method=post>\n" ); print( "a = <input type=text size=10 name=a ><br>\n" ); print( "<input type=submit value=Submit>\n" ); print( "</form>\n" ); } ?></body></html> returns: Notice: Undefined variable: a in f:\http\htdocs\teste.php on line 2 Notice: Undefined variable: PHP_SELF in f:\http\htdocs\teste.php on line 5 a = <input> <submit> The first notice is another thing beyond my comprehension. I'd like to know whether anyone knows how to resolve this. Thanks in advance.

« previous php.windows (#16652) next »