RE: [PHP-INST] POST problems
| From: | Moraes, Fabio | Date: | Wed, 25 Sep 2002 12:35:40 +0000 |
| Subject: | RE: [PHP-INST] POST problems | ||
| Groups: | php.install | ||
| Request: | Send a blank email to php-install+get-8568@lists.php.net to get a copy of this message | ||
first: you need to set register_globals to "on" in your php.ini OR (and
recommended) use global variables $_GET[] and $_POST[]
second: please, use '%20' instead of ' ' while treating HTML strings ....
---
Fabio Moraes
fabio.moraes@eds.com
+55 21 3088 9548
> -----Original Message-----
> From: Aitor [mailto:aitorcabrera@hotmail.com]
> Sent: Tuesday, September 24, 2002 6:34 PM
> To: php-install@lists.php.net
> Subject: [PHP-INST] POST problems
>
>
> Hi to all. I have installled Xitami v2.4d9 and PHP 4.2.3 on
> Windows98se. Everything looks ok.
> I have just started to learn PHP and I did a little program
> just to test the server. There are to webs:
>
> INDEX.PHP
>
> <HTML>
> <HEAD>
> <TITLE>Index.php</TITLE>
> </HEAD>
> <BODY>
> <a href="resultado.php?saludo=hola&texto=Esto es una variable
> texto">Paso variables saludo y texto a la página destino.php</a>
> </BODY>
> </HTML>
>
>
> RESULTADO.PHP
>
> <HTML>
> <HEAD>
> <TITLE>resultado.php</TITLE>
> </HEAD>
> <BODY>
> <?
> echo "Variable \$saludo: $saludo <br>\n";
> echo "Variable \$texto: $texto <br>\n"
> ?>
> </BODY>
> </HTML>
>
> But I get this error:
>
> Notice: Undefined variable: saludo in
> D:\XITAMI\webpages\test\resultado.php on line 7
> Variable $saludo:
>
> Notice: Undefined variable: texto in
> D:\XITAMI\webpages\test\resultado.php on line 8
> Variable $texto:
>
> I have try differents forms but I always get the some error,
> "Undefined variable".
> Why the fisrt web doesn't pass the variables to the second one?
> In my php.ini I have:
>
>
> ; cgi.force_redirect is necessary to provide security running
> PHP as a CGI under
> ; most web servers. Left undefined, PHP turns this on by
> default. You can
> ; turn it off here AT YOUR OWN RISK
> ; **You CAN safely turn this off for IIS, in fact, you MUST.**
> cgi.force_redirect = 0
>
> ; if cgi.force_redirect is turned on, and you are not running
> under Apache or Netscape
> ; (iPlanet) web servers, you MAY need to set an environment
> variable name that PHP
> ; will look for to know it is OK to continue execution.
> Setting this variable MAY
> ; cause security issues, KNOW WHAT YOU ARE DOING FIRST.
> ; cgi.redirect_status_env = ;
>
> I have not write any "environment variable" because I don't
> know what is that!! I have look for help reading all the
> install notes! Is this the cause of my problem, I think so
> but I don't know how to solve this.
>
> Thanks to everyone that has read this!!
>
> From the Canary Islands (Spain), Aitor. :)
>