try $_POST['a'] and $_SERVER['PHP_SELF']
----- Original Message -----
From: Cataphract <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, October 30, 2002 7:13 PM
Subject: [PHP-WIN] Vriables via URL


> 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.
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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

Reply via email to