note 34299 rejected from faq.installation by didou

From: Date: Tue, 22 Jul 2003 01:26:26 +0000
Subject: note 34299 rejected from faq.installation by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-52470@lists.php.net to get a copy of this message
Note Submitter: afvillalba@ubbi.com ---- I'm in my first steps in PHP, working in Windows Me, using Personal Web Server, and PHP 4.3.1 Win 32 (downloaded from PHP site). PHP is working, but variables are not passed from form to action=xx.php. I was trying the form: <HTML><HEAD><TITLE></TITLE> </HEAD> <BODY bgcolor="#ffffff" marginheight=10 marginwidth=10 leftmargin=10 topmargin=10> <form action="testphp.php" method="post" enctype="multipart/form-data"> <font face="Arial,Helvetica" size=2><b>Nombre:</b></font> <input name="nombre" size=47 value=""> <br><br> <input type="submit" name="submit" value="Enviar"> </form> </BODY> </HTML> This is the testphp.php: <HTML><HEAD><TITLE></TITLE> </HEAD> <BODY bgcolor="#ffffff"> <br><br><br> <?php echo("Nombre:$nombre, Vars:$HTTP_POST_VARS"); ?> </BODY> </HTML> Typed a text in “nombre”, press “Enviar”, and this is the result: Notice: Undefined variable: nombre in C:\WebShare\CV\Correo\testphp.php on line 7 Nombre:, Vars:Array So, FORM is not passing variables to php!? I've also tried: <html> <body> <t1> <?php $myvar = "Hello World"; echo "$myvar"; ?> </t1><br><br> The current date and time: <?php $current = date("I, d-M-Y H:i:s T"); echo "$current"; ?> <br><br> The previous Web page: <?php echo "$HTTP_REFERER"; ?> <br><br> Your IP address: <?php echo "$REMOTE_ADDR"; ?> <br><br> Your browser type and OS: <?php echo "$HTTP_USER_AGENT"; ?> <br><br> </body> </html> And: Hello World The current date and time: 0, 11-Jul-2003 19:45:06 Hora estándar Sudamérica E. The previous Web page: Notice: Undefined variable: HTTP_REFERER in C:\WebShare\_Pruebas\HelloWorld.php on line 9 Your IP address: Notice: Undefined variable: REMOTE_ADDR in C:\WebShare\_Pruebas\HelloWorld.php on line 11 Your browser type and OS: Notice: Undefined variable: HTTP_USER_AGENT in C:\WebShare\_Pruebas\HelloWorld.php on line 13

« previous php.notes (#52470) next »