Re: function --> global variables
| From: | Hardy Merrill | Date: | Mon, 05 Mar 2001 22:52:40 +0000 |
| Subject: | Re: function --> global variables | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-42685@lists.php.net to get a copy of this message | ||
Augusto Cesar Castoldi [castoldi@inf.ufsc.br] wrote:
> I have a html form and his "action" is a php file.
>
> this is the php file:
> ________________________________
> function checasenha($ID) {
^^^
> $as="\"";
> global $ID, $limite, $cdusuario, $usuario, $senha;
^^^
> .
> .
> .
> }
>
> checasenha($ID);
> --------------------------------------
>
> Warning: Variable used in global statement already exists in the function in
> /home/httpd/html/fiesc_sessao/checa_senha.php3 on line 13
>
> The "line 13" is "global $ID, $limite....."
>
> What's could be the problem?
Notice my ^'s above - you are already defining $ID in your
function declaration. You can't do that *and* declare $ID as
a global.
--
Hardy Merrill
Mission Critical Linux, Inc.
http://www.missioncriticallinux.com
>
> regards,
>
> Augusto Cesar Castoldi
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net