scope of a variable
| From: | Omar Armas Aleman | Date: | Fri, 18 Aug 2000 18:04:03 +0000 |
| Subject: | scope of a variable | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-12513@lists.php.net to get a copy of this message | ||
I have a variable $poliza like this:
$poliza = array(
"tipo" => $tipo,
"numero" => "",
"cliente_id" => "",
"poliza_id" => ""
);
which I populate and use at a file called "polizanueva.php".
Well, my problem is that from this file, users are redirected to another
file with:
//this is in polizanueva.php
printf("<FORM action=caso.php method=post>");
printf("<INPUT type=submit value='Registrar caso'>");
printf("</FORM>");
How can I preserve the values of $poliza(defined in polizanueva.php) from
the file caso.php?
I tried declaring it global, but doesn't work.
Is there a way to pass it like a parameter in the FORM declatarion?
Thanks.
--
Omar