Hi all,

is there any reason why an included remote file does not return a
variable?

I have constructed a login page, where a user can enter his username and
password.

After completion of the form, I include a verification file on a remote
server, that checks the given username and pass with the database on
that remote server.

I have set up the line as follows:

$person_id =
include("http://www.someremoteserver.com/check_login.php?user=$user&pass=$pass";)

and in the remote file:

$query = "SELECT * FROM persons WHERE per_username='$user' AND
per_password='$pass'";
$result = mysql_query($query);

if (mysql_num_rows($result)==1)
{
 $row = mysql_fetch_array($result);
 $person_id = $row["per_id"];
 return $person_id;
}
else
{
 return -99;
}


The inclusion was succesful, checking username and pass is succesful,
but returning the variable fails, so the value of $person_id is always
set to 1.

Could this be due to some settings on the remote server, that prevent it
from passing variables back?
--
Imar de Vries - [EMAIL PROTECTED] - ICQ 6972439



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to