Hi Greg,

I can't C a call 2 Ur function login() in the below
code-snipplet ... perhaps that's the clue ??

Greetinx,
  Mike

Michael Rudel
- Web-Development, Systemadministration -
_______________________________________________________________

Suchtreffer AG
Bleicherstraße 20
D-78467 Konstanz
Germany
fon: +49-(0)7531-89207-17
fax: +49-(0)7531-89207-13
e-mail: mailto:[EMAIL PROTECTED]
internet: http://www.suchtreffer.de
_______________________________________________________________




> -----Original Message-----
> From: Greg K [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, May 17, 2001 2:17 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] function login problem
>
>
> I am creating a function called login, I have a main file
> called index.php
> .. which has my login form , it calls a login.php file, and in that
> login.php there is file include statement which calls
> config.php and that is
> where the function lie. This is my function , now if i don't
> set this as a
> function and just put it my login.php it works fine. But when
> I name the
> function in put it in my config.php no matter what I do all
> ways giving me
> the error You have entered an invalid username or password. I
> dont know if
> this has to do with passing of variables.. or what is going on but if
> something can please help me I would appreciate it ..
>
> Thank You
>
>   function login() {
> $query="Select uname from members where pass='$pass'and
> uname='$username'";
> $result=mysql_query($query) or die("You are not authorized to
> be here.");
> $array= @mysql_fetch_array($result);
> $uname = $array[0];
> if($uname=="")
> {
> echo "You have entered an invalid username or password";
> }
> else
>
> {
> echo "You are logged in";
> $remote_address = getenv("REMOTE_ADDR");
>         echo "Your IP address is $remote_address.";
> }
> }
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
>


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to