RE: [PHP] FW: Cannot Redeclare?
| From: | John Holmes | Date: | Mon, 23 Sep 2002 03:00:57 +0000 |
| Subject: | RE: [PHP] FW: Cannot Redeclare? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-117228@lists.php.net to get a copy of this message | ||
Funcs.php is probably being included twice at some point in your code.
---John Holmes...
> -----Original Message-----
> From: Stephen Craton [mailto:webmaster@melchior.us]
> Sent: Sunday, September 22, 2002 10:56 PM
> To: php-general@lists.php.net
> Subject: [PHP] FW: Cannot Redeclare?
>
> Hello,
>
> I was just wondering...again...why the heck I keep getting this error.
> I'm trying to make a function called login() and sometimes it works,
> other times it hates me and gives me this error:
>
> Fatal error: Cannot redeclare login() in
> c:\apache\htdocs\wiredphp\member\funcs.php on line 5
>
> Here's the contents of the function login():
>
> function login($username, $password)
> {
> $sql = "select * from members where username='$username' and passwd
=
> password('$password')";
> $result = mysql_query($sql, $wired);
> if (!$result)
> return 0;
>
> if (mysql_num_rows($result)>0)
> return 1;
> else
> return 0;
> }
>
> Please help. I don't see why this keeps happening...
>
> Thanks,
> Stephen
> http://www.melchior.us
> http://php.melchior.us
>
> P.S. I'm sending this again because I don't know if the other got
> through or not...
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php